473,394 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Altering Menu Bar Macros with Visual Basic

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
3 2034
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Richard Hollenbeck | last post by:
Back in the old days before I started learning about menubars (the day before yesterday,) I based all my operations on command buttons on the forms. Now the forms are all cluttered up with buttons...
3
by: swingingming | last post by:
where can i find it again? Thanks
1
by: Bernie Yaeger | last post by:
My client has a visual foxpro app that he wants me to hook into. I'm connecting to it via odbc using visual basic .net with this connectionstring: Dim oconn_d As New...
5
by: Robert Smith | last post by:
Hello, I have often seen system tray icons that you click on and a popup menu appears. Is it possible to do this in Visual basic.net or are there any controls that allow this to be achieved. ...
7
by: Phill Emery | last post by:
hi can anyone please help me? Im new to visual studio 2003 and im trying to create a program in visual basic. The problem is i have put a menu bar onto the first form, and have created some...
3
by: dan_roman | last post by:
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros within it. The script runs perfectlly in Office...
17
by: GS | last post by:
the main menu in the application seemed to disappeared all together until I click on an control and select mainmenu1 in designer. then the mainmenu1 displays where it should be but running it or...
0
by: bernhard.nowara | last post by:
Hello, I found a bug in Visual Basic used with Visual Studio Macros (Microsoft Visual Studio 2005 + SP1). Description: If I apply the simple Visual Basic statement...
20
by: timmg | last post by:
You know, I've had so much fun reading the thread on lookup field's subservience to the Dark One that I thought I'd provoke another, ah, polite discussion on the topic of Macros. I've always...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.