By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,283 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,283 IT Pros & Developers. It's quick & easy.

Altering Menu Bar Macros with Visual Basic

P: n/a
I want to alter a menu bar based on user's actions. My menu bar is
established using macros. Is there any way to edit the menu bar macro
using Visual Basic, so that the menu name will change. I only want to
change the menu macro name and not the condition or the action.

Thanks, Peter
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I don't use Macros (aside from AutoExec), so I can't say what will happen
when you try to modify one, or something based on one. If you set a
reference to "Microsoft Office <your version #> Object Library" you will
have access to the CommandBars collections/objects and other things. These
will give you programatic access to all menus and toolbars in Access.

Mike Storr
www.veraccess.com
"Peter Stalder" <pe******@excite.com> wrote in message
news:31**************************@posting.google.c om...
I want to alter a menu bar based on user's actions. My menu bar is
established using macros. Is there any way to edit the menu bar macro
using Visual Basic, so that the menu name will change. I only want to
change the menu macro name and not the condition or the action.

Thanks, Peter

Nov 12 '05 #2

P: n/a
Thanks Mike

I didn't realize that there were ways to customize menus without using
macros. I guess I have been programming in Access for too long now.

I had looked into CommandBars but couldn't figure it how to access my
macros. Custom Menu Bars would probably work but I decided to drop my
attempt to mimic the old VB program I was trying to recreate. I will
just make the commands available on the screen where I can easily
change the description. So the point is now moot.

Peter

"Mike Storr" <st******@sympatico.ca> wrote in message news:<5_********************@news20.bellglobal.com >...
I don't use Macros (aside from AutoExec), so I can't say what will happen
when you try to modify one, or something based on one. If you set a
reference to "Microsoft Office <your version #> Object Library" you will
have access to the CommandBars collections/objects and other things. These
will give you programatic access to all menus and toolbars in Access.

Mike Storr
www.veraccess.com
"Peter Stalder" <pe******@excite.com> wrote in message
news:31**************************@posting.google.c om...
I want to alter a menu bar based on user's actions. My menu bar is
established using macros. Is there any way to edit the menu bar macro
using Visual Basic, so that the menu name will change. I only want to
change the menu macro name and not the condition or the action.

Thanks, Peter

Nov 12 '05 #3

P: n/a
Hi Peter,

Funnily enough, I was just reading this article. This'll sort you out.

http://techrepublic.com.com/5102-6329-5034767.html

Please don't think me rude, but my advice is to try and stop using macros!
AutoExec if you must (better to use a splash form at the startup form and
put initialisation code in it's Timer event handler), and AutoKeys by all
means, but that's it. What happens when a macro encounters an error -
crash! How do you step through a macro and debug it? How to you update a
menu macro on the fly...oh, well, you're with me on that one! Access can
convert macros to code, although I've never tried to use it to reconstruct
menus from menu macros.

Andrew
"Peter Stalder" <pe******@excite.com> wrote in message
news:31**************************@posting.google.c om...
I want to alter a menu bar based on user's actions. My menu bar is
established using macros. Is there any way to edit the menu bar macro
using Visual Basic, so that the menu name will change. I only want to
change the menu macro name and not the condition or the action.

Thanks, Peter

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.