J
JRD
I'm very new at trying to use VBA. I am trying to use the MenuMakr file
to build a new menu and am having problems.
I downloaded the file and managed to get the proper menu built.
Everything works fine when I manually run the CreateMenu and DeleteMenu
macros. The problem comes in when I try to get the subs to run
automatically upon opening or closing the file.
The instructions say to "Add subroutines like these to the code module
for the ThisWorkbook object:
Private Sub Workbook_Open()
Call CreateMenu
End Sub
Private Sub Workbook_BeforeClose(Cancel as Boolean)
Call DeleteMenu
End Sub
I'm not sure where to put these subs to make them run. I tried the
"Insert Module" and that doesn't seem to work. I also tried to tack
them onto the end of an existing module and that also didn't seem to
help. I even tried to add them as a class under ThisWorkbook.
I'm sure this is something very basic, but any help would be
appreciated.
Jim
to build a new menu and am having problems.
I downloaded the file and managed to get the proper menu built.
Everything works fine when I manually run the CreateMenu and DeleteMenu
macros. The problem comes in when I try to get the subs to run
automatically upon opening or closing the file.
The instructions say to "Add subroutines like these to the code module
for the ThisWorkbook object:
Private Sub Workbook_Open()
Call CreateMenu
End Sub
Private Sub Workbook_BeforeClose(Cancel as Boolean)
Call DeleteMenu
End Sub
I'm not sure where to put these subs to make them run. I tried the
"Insert Module" and that doesn't seem to work. I also tried to tack
them onto the end of an existing module and that also didn't seem to
help. I even tried to add them as a class under ThisWorkbook.
I'm sure this is something very basic, but any help would be
appreciated.
Jim