Happy Friday,
I'm very familiar with excel, but not so much with VBA. I'm creating a form with drop downs and one "enter" button at the bottom. When I go to test I get a Variable not defined error with PrivateSub CommandButton1_Click() highlited in yellow along with the (x1Down). Help Please
End Function
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim iRow As Long
iRow = Sheets("Data").Range("A2:A1048576").End(x1Down).Row + 1
If ValidateForm = True Then
With ThisWorkbook.Sheets("Data")
.Range("A" & iRow).Value = iRow - 1
.Range("B" & iRow).Value = monthinspected.Text
.Range("C" & iRow).Value = Inspector.Text
.Range("D" & iRow).Value = inspecitontype.Text
End With
Call Reset
Else
Application.ScreenUpdating = True
Exit Sub
End If
Application.ScreenUpdaitng = True
End Sub
I'm very familiar with excel, but not so much with VBA. I'm creating a form with drop downs and one "enter" button at the bottom. When I go to test I get a Variable not defined error with PrivateSub CommandButton1_Click() highlited in yellow along with the (x1Down). Help Please
End Function
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim iRow As Long
iRow = Sheets("Data").Range("A2:A1048576").End(x1Down).Row + 1
If ValidateForm = True Then
With ThisWorkbook.Sheets("Data")
.Range("A" & iRow).Value = iRow - 1
.Range("B" & iRow).Value = monthinspected.Text
.Range("C" & iRow).Value = Inspector.Text
.Range("D" & iRow).Value = inspecitontype.Text
End With
Call Reset
Else
Application.ScreenUpdating = True
Exit Sub
End If
Application.ScreenUpdaitng = True
End Sub