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

How can I disabled at run time, a button created at design time with t

Status
Not open for further replies.

amarti44

Programmer
Feb 16, 2001
23
US
Hi:
How can I disabled at run time, a button created at design time with the Toolbar Control. I have this so far...

Dim button As Button

button.ButtonMenus("Send").Enabled = False

where "Send" is the Button Key at design time. My question is how to match this with the Toolbar Control Toolbar1.

I tried
Set button = Toolbar1.Buttons.?
But I can't find any property or method that allows me to assign the specified button (created at design time) with the var button. Any suggestion?
 
Amarti44,

You have the right idea. On that Set statement check this out...

Code:
Set button = Toolbar1.Buttons(index)

In the above statement though you need to know the index of the button. I am not sure on the statement but if you can find the statement that returns the index with the use of the key then I think you'll be set.

Sorry couldn't help more. Mavors
Cincinnati, Ohio
 
amarti44,

Here is a small code snipet that will solve you problem.

Private Sub Form_Load()
Toolbar1.Buttons(1).Enabled = False
End Sub


Keep'n it simple
reidfl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top