PEREZJ
02-04-2013, 06:18 PM
nline should increment by 1 every time I press the button, but it changes to 0. I'm have trouble passing the variable and defining them, please help.
Private Sub ComboBox1_Change()
End Sub
Private Sub ComboBox2_Change()
End Sub
Private Sub CommandButton1_Click()
Dim nline As Integer
nline = nline + 1
Range("C1").Value = ComboBox1.Text
Cells(nline, 4).Value = Now()
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub nline_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Me.ComboBox1.List = Worksheets("setup").Range("A1:A3").Value
Me.ComboBox2.List = Worksheets("setup").Range("B1:B3").Value
End Sub
Private Sub ComboBox1_Change()
End Sub
Private Sub ComboBox2_Change()
End Sub
Private Sub CommandButton1_Click()
Dim nline As Integer
nline = nline + 1
Range("C1").Value = ComboBox1.Text
Cells(nline, 4).Value = Now()
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub nline_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
Me.ComboBox1.List = Worksheets("setup").Range("A1:A3").Value
Me.ComboBox2.List = Worksheets("setup").Range("B1:B3").Value
End Sub