K
kmzito
I have the below as a Userform box. Can someone assist with cleaning
it up and solving my error? I get the 'Compile Error: Block If Without
End If" I have all of my End If's in, so I'm not sure where the issue
lies.
Private Sub OKBUtton_click()
Dim Cell As Range
'Monthly
If OptionMonthly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A12").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Quarterly
If OptionQuarterly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A4").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Yearly
If OptionYearly Then
If OptionQuarterly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A1").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Other
If OptionOther Then
If OptionQuarterly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A12").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Closes dialog box
Unload UserForm2
End Sub
it up and solving my error? I get the 'Compile Error: Block If Without
End If" I have all of my End If's in, so I'm not sure where the issue
lies.
Private Sub OKBUtton_click()
Dim Cell As Range
'Monthly
If OptionMonthly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A12").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Quarterly
If OptionQuarterly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A4").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Yearly
If OptionYearly Then
If OptionQuarterly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A1").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Other
If OptionOther Then
If OptionQuarterly Then
Sheets("List").Select
Range("A3").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Range("A1:A12").Select
Selection.EntireRow.Insert
ActiveCell.Select
End If
'Closes dialog box
Unload UserForm2
End Sub