View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Identifying toolbars.

I use this code in a program I have and it takes away then restores the
peripheral controls without changing any settings.

To hide:
With ActiveWindow
.DisplayHorizontalScrollBar = False 'Make space and clear screen
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayHeadings = False
.DisplayGridlines = False
End With

To resto
With ActiveWindow 'This with statement sets everything to normal
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayHeadings = True
.DisplayGridlines = True
End With


"Ben" wrote:

I have wriiten a few lines of code that cause Excel to switch to full screen
and to eliminate the toolbars and formula bar etc when the sheet is activated
. On deactivation I also have a macro to restore the screen back to normal
view along with the toolbars that I normally use. My question is: If I am
applying this code on another person's computer how can I determine what
toolbars were visible prior to the sheet activation macro so that I can
restore them on de-activation.
Thank you