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
hrs = raw_input("Enter Hours:") | |
hors=float(hrs) | |
rate = raw_input("Enter Rate:") | |
rate1=float(rate) | |
total=hors*rate1 | |
print type(hors), type(rate1), type (total) | |
print total |
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
max = None | |
min= None | |
while True: | |
num = raw_input("Enter a number: ") | |
if num == "done" : break | |
if len(num)<1 : break | |
try: | |
num = float(num) | |
except : | |
print "Invalid input" |
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 UserForm_Activate() | |
If Hoja1.Cells(1, 1) <> "" Then | |
For z = 1 To 500 | |
ComboBox1.AddItem Hoja1.Cells(z, 1) | |
Next z | |
Rem deja en blanco el combo | |
ComboBox1.Text = "" | |
End If | |
End Sub |
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 ComboBox1_Click() | |
Hoja3.Activate | |
ultimo = Hoja2.Cells(1, 1) | |
linea = 1 | |
For z% = 2 To ultimo | |
indice = z% | |
CodCliente = ComboBox1.ListIndex + 1 | |
If CodCliente = Hoja2.Cells(z%, 1) Then | |
monto = Hoja2.Cells(z%, 4) | |
If Hoja2.Cells(z%, 5) = "Debe" Then |
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 CommandButton1_Click() | |
Rem posicion del indice en la celda 1,1 | |
indice = Hoja1.Cells(1, 1) | |
Rem si el indice es cero se cambia a uno | |
If indice = "" Then | |
indice = 1 | |
Hoja1.Cells(1, 1) = indice | |
End If | |
Rem incrementa el indice en 1 lugar que es la fila donde debe grabar | |
indice = indice + 1 |
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 UserForm_Activate() | |
ComboBox1.AddItem "Haber" | |
ComboBox1.AddItem "Debe" | |
ComboBox1.Text = ComboBox1.List(1) | |
TextBox1.Text = Date | |
ComboBox2.SetFocus | |
If Hoja1.Cells(1, 1) <> "" Then | |
For z = 1 To 500 | |
ComboBox2.AddItem Hoja1.Cells(z, 1) | |
Next z |
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 CommandButton1_Click() | |
Rem posicion del indice en la celda 1,1 | |
indice = Hoja2.Cells(1, 1) | |
Rem si el indice es cero se cambia a uno | |
If indice = "" Then | |
indice = 1 | |
Hoja2.Cells(1, 1) = indice | |
End If | |
Rem incrementa el indice en 1 lugar que es la fila donde debe grabar | |
indice = indice + 1 |
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 UserForm_Activate() | |
Rem llena los valores del combo cada vez que parte el programa userform_activate | |
Rem para ello primero parte de la posicion 2 | |
Rem y cambia los valores de z desde 1 a 500 | |
Rem y con el metodo additem llena al combo de valores (nombres de articulos) | |
If Hoja1.Cells(1, 1) <> "" Then | |
For z = 1 To 500 | |
ComboNombre.AddItem Hoja1.Cells(z, 1) | |
Next z | |
Rem deja en blanco el combo |
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 TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean) | |
Rem calcula el total de la venta y lo coloca en textbox4.text | |
TextBox4.Text = TextBox2.Text * TextBox3.Text | |
End Sub |
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 CommandButton4_Click() | |
Rem para emitir cartola | |
Rem se carga userform4 | |
Load UserForm4 | |
Rem se muestra userforrm4 | |
UserForm4.Show | |
End Sub |