wilg
02-05-2012, 09:24 AM
I have a userform that will activate if in column a. However I do not want it to activate if it is below a certain row.
eg range("ak301").value which gives me the row number I want the userform to stop activating at.
Is there a way to use an if statement to include if below row ak301's value (eg row 354) then unload userform or exit?
my userform is called Names1
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "COMPLETE_NAME"
ComboBox1.Value = ActiveCell.Value
With ComboBox1
.SelStart = 0
.SelLength = Len(ComboBox1)
End With
End Sub
eg range("ak301").value which gives me the row number I want the userform to stop activating at.
Is there a way to use an if statement to include if below row ak301's value (eg row 354) then unload userform or exit?
my userform is called Names1
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "COMPLETE_NAME"
ComboBox1.Value = ActiveCell.Value
With ComboBox1
.SelStart = 0
.SelLength = Len(ComboBox1)
End With
End Sub