Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Identifying Visible Toolbars

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DCSwearingen - 31 Dec 2005 20:01 GMT
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?

Signature

DCSwearingen

Tom Ogilvy - 31 Dec 2005 20:35 GMT
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.

Signature

regards,
Tom Ogilvy

> 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
[quoted text clipped - 5 lines]
>
> Any quick code for this?
DCSwearingen - 31 Jan 2006 23:33 GMT
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

--
DCSwearinge
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.