can i disable one menu item til another menu item is clicked

anis

Board Regular
Joined
Dec 28, 2004
Messages
87
i guess that quest is pretty straight 4ward... so... can i act do it using macro???

thanx for any reply~~

regards,
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Re: can i disable one menu item til another menu item is cli

Use Enabled method of CommandBarControl.

For example:
-------------------------------------------------------------------------------
Dim myControl As CommandBarControl
Set myControl = Application.CommandBars.ActiveMenuBar.Controls(1).Controls(1)
myControl.Enabled = False
---------------------------------------------------------------------------------

Tim
 
Upvote 0
Re: can i disable one menu item til another menu item is cli

sorry..mayb i need to describe more here...
i know how to disable the menu items..but i want to only disable the menu item until another menu item is clicked.

let's say... i have two menu items : Start and Calculate

i need to disable the calculate menu item once the worksheet is loaded until the user runs the macro associate with the start menu item ( ie until the start menu item is clicked)
i want to do this to make sure that users will follow the sequence correctly and they wont get any error msgs if they dont do it in sequence (the macros has variables linked to them so the sequence has to be followed)that i know would freaked them out if they have no clue bout this macro thing ( i was once that user :) ).

hope uve got wut im trying to do now..
thanx nway for ur reply...

regards,
 
Upvote 0
Re: can i disable one menu item til another menu item is cli

I mean that you need include Calculate.Enabled = NOT Calculate.Enabled into your Start menu codes. When Start menu is clicked, it set the Enabled prop. of menu Calculate.
 
Upvote 0
Re: can i disable one menu item til another menu item is cli

and how to do that exactly??? thanx 4 helping out~
 
Upvote 0
Re: can i disable one menu item til another menu item is cli

Seems you like fish than how to fish becasue you ask "how to do EXACTLY".

Anyway things like:

1. Use OnAction to set your Start menu code like Start.OnAction="MyCode"
2. Compose "MyCode" including Calculate.Enabled=False.

When you click Start menu, Excel will run MyCode which reset Calculate menu.
 
Upvote 0
Re: can i disable one menu item til another menu item is cli

thanx nway eventhough i still cant really sort it out...but its ok i'll try figure it out myself now...n act..i dont even like fish...
ur help is higly appreciated. THANX
 
Upvote 0
got it

ive finally understand where i went wrong... solved the prob now... thanx a lot
 
Upvote 0

Forum statistics

Threads
1,203,727
Messages
6,056,983
Members
444,901
Latest member
Teal

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top