I have the code in my userform like this:
Private Sub UserForm_Initialize()
With Worksheets("sheet8")
Me.ComboBox1.List = .Range("b11:b500")
End With
End Sub
and the code in sheet1 like this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("c11:c500")) Is Nothing Then
If Target.Value = "" Then
UserForm1.Show
Else
Exit Sub
End If
End If
End Sub
I got the error said : "Runtime error '9' : Subscript out of range
Can someone point out for me what's the errors are ? how can I fix this ?
Thanks
Private Sub UserForm_Initialize()
With Worksheets("sheet8")
Me.ComboBox1.List = .Range("b11:b500")
End With
End Sub
and the code in sheet1 like this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("c11:c500")) Is Nothing Then
If Target.Value = "" Then
UserForm1.Show
Else
Exit Sub
End If
End If
End Sub
I got the error said : "Runtime error '9' : Subscript out of range
Can someone point out for me what's the errors are ? how can I fix this ?
Thanks