Oct 22, 2002 #1 dvannoy MIS May 4, 2001 2,765 US This has got to be an easy one. How do you disable a button on a toolbar?? I can "Remove" it but cannot Disable it. I have a toolbar with Image List and Buttons. I want to be able to Disable or Enable the Buttons based on the users login.. Thanks
This has got to be an easy one. How do you disable a button on a toolbar?? I can "Remove" it but cannot Disable it. I have a toolbar with Image List and Buttons. I want to be able to Disable or Enable the Buttons based on the users login.. Thanks
Oct 22, 2002 1 #2 teh215 MIS Jul 2, 2002 56 US Toolbar1.Buttons("ButtonIndex".Enabled=False Replace "ButtonIndex" with the index of the button. Upvote 0 Downvote
Toolbar1.Buttons("ButtonIndex".Enabled=False Replace "ButtonIndex" with the index of the button.
Oct 22, 2002 #3 TomZC Programmer Oct 22, 2002 8 US Disabling based on the button's index will work. However, IMO disabling based on a descriptive key makes code a little more readable. Here's how. Make sure each button has a descriptive key (in the toolbar's right-click properties -- button tab). When you want to disable a button, you can do it like this (for a toolbar named tbrTools and a button with the key name "cut.": Code: tbrTools.Buttons("cut").Enabled = False Upvote 0 Downvote
Disabling based on the button's index will work. However, IMO disabling based on a descriptive key makes code a little more readable. Here's how. Make sure each button has a descriptive key (in the toolbar's right-click properties -- button tab). When you want to disable a button, you can do it like this (for a toolbar named tbrTools and a button with the key name "cut.": Code: tbrTools.Buttons("cut").Enabled = False