Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Identifying Visible Toolbars


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?


--
DCSwearingen


------------------------------------------------------------------------
DCSwearingen's Profile: http://www.excelforum.com/member.php...o&userid=21506
View this thread: http://www.excelforum.com/showthread...hreadid=497189

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Identifying Visible Toolbars

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"
wrote in message
...

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?


--
DCSwearingen


------------------------------------------------------------------------
DCSwearingen's Profile:

http://www.excelforum.com/member.php...o&userid=21506
View this thread: http://www.excelforum.com/showthread...hreadid=497189



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Identifying Visible Toolbars


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

-----------------------------------------------------------------------
DCSwearingen's Profile: http://www.excelforum.com/member.php...fo&userid=2150
View this thread: http://www.excelforum.com/showthread.php?threadid=49718

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding all visible toolbars by writing their numbers to an array Peter Rooney Excel Programming 6 July 28th 05 02:05 PM
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. Oscar Excel Programming 6 June 21st 05 10:39 PM
Please Help, No Toolbars in my view-toolbars! [email protected] Excel Programming 2 February 19th 05 09:15 PM
Autoshapes not visible on spreadsheet but visible in print preview John Excel Discussion (Misc queries) 3 February 11th 05 10:23 PM
Toggle Text in a column to be visible or not visible Dave Y[_3_] Excel Programming 4 January 8th 04 08:46 PM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"