VBA Menus and Sub Menus

P

Peter Rooney

I don't know if I offended anyone with my seeming desperation (or even
perceived sarcasm - it wasn't, honest) on my earlier post on creating menus
and sub menus in project. Whatever it was, nobody posted anything in response.
If people think I'm being lazy in asking what might appear to be a
fundamental question, then I apologise - I'm just REALLY stuck. Could anyone
point me in the direction of any on-line information that might help me to
resolve this problem..? The link to the Microsoft site and the Project 98 VBA
book was excellent, it just doesn't seem to cover what i want to do in enough
detail.
Thanks in advance

Pete
 
R

Rod Gill

Have you tried recording a macro of you manually doing this? Usually if
nothing gets recorded it's not possible with VBA, otherwise you get your
answer

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.project-systems.co.nz/
Email rodg AT project-systems DOT co DOT nz
 
P

Peter Rooney

Rod,

Thanks for answering!

What I'm trying to do is to create a new menu on the menu bar which contains
a mixture of commands and sub menus, each containing their own commands in
turn.

I can create a new menu on the menu bar containing individual menu items, or
I can create a sub menu on an existing menu item (e.g. "Tools") What I can't
do is create my own menu with this menu item/sub menu functionality.

I then need to be able to attach macros to the respective commands in the
menus and sub menus.

I don't THINK that I can do this in Project whilst recording myself
(although I'd be delighted to be proved wrong..!). My Project 98 VBE book
gives me just enough to believe that I can do what I want (including the use
of class modules to attach code to menu items), but not enought to show me
how to actually do it.

If there's a book out there that gives me examples of just what i want, I'd
gladly buy it!

Thanks for your interest, whether you can point me in the direction of such
a tome or not!

Regards

Pete
 
R

Rod Gill

Hi,

Record a macro of you doing this manually. If nothing is recorded, it's
likely it can't be done. I suspect however that it can be and a recorded
macro is the quickest way to find out how.

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.project-systems.co.nz/
Email rodg AT project-systems DOT co DOT nz
 
P

Peter Rooney

Thanks for the advice, Rod.

I've managed a compromise - I'm using "onaction" to attach a macro to a menu
item - it's a throwback to Office 97, but it DOES work. I'm not really sure
how I'd go about creating a custom menu manually but I'll give it a shot if I
get the time - at least what I've got now works, even if it is a bit patchy!

Cheers

Pete
 

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