I suppose the only reason you want to disable/enable the toolbar is because there is command buttons contained within it?
To do that, disable the actual buttons. The toolbar itself can not be disabled. You can however set it to visible true/false.
'Disable buttons...
Toolbar1.Buttons("MyButtonName").Enabled = True
I found this to work as well:
toolbar1.Buttons.Item(1).Enabled = False
and you are able to change the 'pressed' value with this:
toolbar1.Buttons.Item(1).Value = tbrUnpressed 'or tbrPressed'
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
On line 39 - 43 With Form2
.StatusBar.Panels(2).Text = User
End With
Unload Me
use an if then statement -
If User = "Admin" Then
'nothing here if you want...
Else
toolbar1.Buttons.Item(1).Enabled = False
End if
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Well done. Some rep points for not giving up.:)
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350