Created
February 13, 2013 04:07
-
-
Save tombrad/4942187 to your computer and use it in GitHub Desktop.
Prototipos VBA-2-3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton2_Click() | |
Rem al ingresar la venta | |
Rem el saldo esta en hoja1.cells de la linea de combo que elegimos | |
Rem que en la hoja exel seria la posicion combonombre.listindex + 1 | |
Rem recordar el formato Hoja1.Cells(linea,columna) | |
Rem luego toma el valor (cantidad) almacenado en esa celda y le resta el valor de textbox3.text | |
Hoja1.Cells(ComboNombre.ListIndex + 1, 2) = Hoja1.Cells(ComboNombre.ListIndex + 1, 2) - TextBox3.Text | |
Rem con eso deja la cantidad rebajada | |
Rem luego limpia los textbox combo y pone el foco en combonombre | |
TextBox1.Text = "" | |
TextBox2.Text = "" | |
TextBox3.Text = "" | |
TextBox4.Text = "" | |
ComboNombre.Text = "" | |
ComboNombre.SetFocus | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment