Help with J-Walk's Menumakr

  • Thread starter Thread starter JRD
  • Start date Start date
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
 
Hi

In the VB editor, up left, you should see a tree with all Sheet and Module
objets, and also the ThisWorkbook object. Doubleclick it to get there, and
paste the code in.
 
That worked like a charm. Figured it was something really simple that
just didn't know about. Appreciate your help.


Ji
 
In the VB editor, up left,

This is the "Project Explorer" window<g>. If you don't see it pick it from
the View menu or press Ctrl-r.
 
Back
Top