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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Bar Menu to open directory

Status
Not open for further replies.

Cage

MIS
Aug 25, 2002
50
CA
Hello,

I have created a new custom bar menu (e.g like File, Edit, View). In it have placed custom buttons A, B, C.

I have some code which when you click on A it opens a specific directory, B opens a different directory and C a different one still. I plan having this for about 20 different directories. However I dont want to have 20 pieces of code, ideally I would like to one piece of code, which can detect which button has been selected,

e.g a sub called

Sub d_% (where % is A,B or C)

Any ideas?

TIA

Cage
 
I don't know a way to detect which button is clicked, as it is the individual Object_Click event that fires from the the button being clicked. If the object_Click sub is NOT fired - then the button has not been clicked. If it is clicked, the object_Click IS fired. So, regardless, you will need 20 object_click subs.

However, the above does not apply here. Simply because menu items are NOT buttons. Menu items are pointers to specific pieces of code, specifically, subs. You are just placing that sub on a menu,



Gerry
 
thanks Gerry, I am confused does tha mean it is possible? am i able to detech which menu item was selected. Ie have all the menu items pointing to the same sub, however it is the name of the menu item which determines which directory to open as the directory address is stored as a constant in the module.

thanks

Cage
 
Can you post the module, and some samples the menu structure
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top