Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tools Options View Hidden Objects

Status
Not open for further replies.

NormDuffy

Programmer
Jul 9, 2001
18
0
0
FR
I want to activate this option with vba code so I can show and hide some hidden tables forms modules etc. I hide some things so users are not tempted to play but I want to make them available to some users but hidden from others.
Thanks
Norm
 
If you don't mind making a New tool menu
then you can call it from VBA using using Send keys

here is my code

SendKeys "%{N}", True 'Click on New menu Alt-N
SendKeys "O", True 'Click on Autoform under new menu

I created a new menu next to File, Edit, View, which I just left as "New menu"
I made the N underscore so I could get it with send keys
Next while in the menu design mode I drug a copy of the AutoForm menu item from the Insert menu over and gave it Underscore "O". When you drag over an existing menu item it retains the functionality from where it came.

So it looked like this
New menu
Autoform




DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
That would work but sendkeys is messy and sometimes the keys can be sent to the wrong menu/object and sometimes even to the wrong application if the user happens to alt tab or something during the running of the code. I would expect to find some property that could be set with a simple command from within vba.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top