UserForm_Activate not found

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?
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top