Identifying Visible Toolbars

D

DCSwearingen

I want to be able to de-select all toolbars for the user of a file and,
when the project is complete, re-select the toolbars they originally
had visible.

I have a routine (at work, unfortunately) that will de-select all
toolbars, but I don't have anything that will set the visible toolbars
back to their original state.

Any quick code for this?
 
T

Tom Ogilvy

Loop through your list of commandbars (which you made when you made them not
visible) that were visible and set their visible property to true.

Should be almost identical to the code you have.

--
regards,
Tom Ogilvy

"DCSwearingen" <[email protected]>
wrote in message
news:D[email protected]...
 
D

DCSwearingen

Here is the code I came up with. It can probably be trimmed down b
someone more experienced than myself.


Option Base 1
Global myArray(50, 2)

Sub HideToolbars()
Dim myCount As Single, myState As Boolean, i As Integer
For i = 1 To Toolbars.Count
myCount = i
myState = Toolbars(i).Visible
myArray(i, 1) = myCount
myArray(i, 2) = myState
Toolbars(i).Visible = False
Next
End Sub

Sub RestoreToolbars()
Dim i As Integer
For i = 1 To Toolbars.Count
Toolbars(i).Visible = myArray(i, 3)
Next
End Sub

Thanks again to everyone who answers questions posted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Close all open toolbars 4
Identifying toolbars. 5
Toggle Toolbars in Excel2003 3
Toolbars GONE! 6
Cancel Toolbar load 1
Control panel detection 2
order of toolbars in Excel 2007 2
Missing Toolbars 4

Top