Hi,

I am moving some code of mine over to a user control but I am receiving "Object variable or With block variable not set (Error 91)" when I click the command button.

Code:
 Public UserControl1 As UserControl1
Private Sub cmdRoll_Click()
 UserControl1.Roll
End Sub

Private Sub Form_Load()
 Set UserControl1 = UserControl1
End Sub
If I change the set line to

Code:
 Set UserControl1 = New UserControl1
I receive "Invalid use of New keyword".

Why is this happening?

Thanks,


Nightwalker