UserForm_Activate not found

  • Thread starter Thread starter marston.gould
  • Start date Start date
M

marston.gould

I have a routine in my one Userform....

Private Sub UserForm_Activate()
Call Macro 1
End Sub

I also have the following in my module code

Set MenuItem = ....
With MenuItem
..Caption = "Validate"
..OnAction = "UserForm_Activate"
End With

When I try to run the menuitem, I get

The macro 'filename.xls!Userform_Activate' cannot be found.
Any thoughts?
 
Private

So it can't be seen.

However, you shouldn't call an event. Write a macro that does what you want
and call that. If you want to show the userform

Sub Macro23()
Userform1.show
End Sub
 
Back
Top