simora
01-10-2011, 10:59 PM
When I try to open a UserForm, I get a Run-time error '380'
If I move the button to open the Userform to the worksheet "States" everything works fine.
How do I modify the code so that it works even when the button is on another Worksheet?
This is the code I use to try to open the UserForm
Sub DNewClientForm()
NewClientForm.Show
End Sub
NewClientForm.Show is highlighted as the error point.
This is the initialize code
Private Sub UserForm_Initialize()
ComboBox12.RowSource = Range("States").Range("F2", Range("F65536").End(xlUp)).Address
Set RowSource = Range(ComboBox12.RowSource)
End Sub
If I move the button to open the Userform to the worksheet "States" everything works fine.
How do I modify the code so that it works even when the button is on another Worksheet?
This is the code I use to try to open the UserForm
Sub DNewClientForm()
NewClientForm.Show
End Sub
NewClientForm.Show is highlighted as the error point.
This is the initialize code
Private Sub UserForm_Initialize()
ComboBox12.RowSource = Range("States").Range("F2", Range("F65536").End(xlUp)).Address
Set RowSource = Range(ComboBox12.RowSource)
End Sub