MWhiteDesigns
Well-known Member
- Joined
- Nov 17, 2010
- Messages
- 646
- Office Version
- 2016
- Platform
- Windows
Hey Guys,
So I am attempting to create a userform to make it more user friendly to enter data. I am receiving a compile error stating: Block If without End If. Below is the code I am using.
How can I correct this!? Sorry I am still trying to learn this and I've tried to research as much as possible with no luck!
__________________________________________
Private Sub CmdEnterData_Click()
Dim RowCount As Long
RowCount = Worksheets("Process Tracker").Range("A1").CurrentRegion.Rows.Count
With Worksheets("Process Tracker").Range("A1")
.Offset(RowCount, 3).Value = Me.NameTextBox.Value
.Offset(RowCount, 1).Value = Me.RequestComboBox.Value
If Me.ARCheckBox.Value = True Then
.Offset(RowCount, 0).Value = "AR# "
If Me.ACCheckBox.Value = True Then
.Offset(RowCount, 0).Value = "Non AC# "
If Me.ClassCheckBox.Value = True Then
.Offset(RowCount, 0).Value = "Class# "
.Offset(RowCount, 4).Value = Me.DeptComboBox.Value
.Offset(RowCount, 5).Value = Me.SystemComboBox.Value
.Offset(RowCount, 6).Value = DateValue(Me.DateReceivedTextBox.Value)
.Offset(RowCount, 8).Value = DateValue(Me.DateSubmittedTextBox.Value)
.Offset(RowCount, 12).Value = Me.CommentsTextBox.Value
End Sub
So I am attempting to create a userform to make it more user friendly to enter data. I am receiving a compile error stating: Block If without End If. Below is the code I am using.
How can I correct this!? Sorry I am still trying to learn this and I've tried to research as much as possible with no luck!
__________________________________________
Private Sub CmdEnterData_Click()
Dim RowCount As Long
RowCount = Worksheets("Process Tracker").Range("A1").CurrentRegion.Rows.Count
With Worksheets("Process Tracker").Range("A1")
.Offset(RowCount, 3).Value = Me.NameTextBox.Value
.Offset(RowCount, 1).Value = Me.RequestComboBox.Value
If Me.ARCheckBox.Value = True Then
.Offset(RowCount, 0).Value = "AR# "
If Me.ACCheckBox.Value = True Then
.Offset(RowCount, 0).Value = "Non AC# "
If Me.ClassCheckBox.Value = True Then
.Offset(RowCount, 0).Value = "Class# "
.Offset(RowCount, 4).Value = Me.DeptComboBox.Value
.Offset(RowCount, 5).Value = Me.SystemComboBox.Value
.Offset(RowCount, 6).Value = DateValue(Me.DateReceivedTextBox.Value)
.Offset(RowCount, 8).Value = DateValue(Me.DateSubmittedTextBox.Value)
.Offset(RowCount, 12).Value = Me.CommentsTextBox.Value
End Sub