ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm_Activate not found (https://www.excelbanter.com/excel-programming/312902-userform_activate-not-found.html)

[email protected]

UserForm_Activate not found
 
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?


Tom Ogilvy

UserForm_Activate not found
 
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

--
Regards,
Tom Ogilvy

" wrote in message
oups.com...
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?





All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com