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

I'm trying to hide the horizontal and vertical scrollbars on a worksheet with

DisplayHorizontalScrollBar = False
DisplayVerticalScrollBar = False

but it's not working.

Any ideas?

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Hide Scrollbars

hi
with activewindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
end with

regards
FSt1
"blackbox via OfficeKB.com" wrote:

I'm trying to hide the horizontal and vertical scrollbars on a worksheet with

.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False

but it's not working.

Any ideas?

--
Message posted via http://www.officekb.com


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Hide Scrollbars

here's all the code, everything worksexcept the scrollbars

Sub RemoveToolbars()
On Error Resume Next
With ActiveWindow
.DisplayFullScreen = False
.CommandBars("Full Screen").Visible = False
.CommandBars("MyToolbar").Enabled = False
.CommandBars("MyToolbar").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars("Formatting").Visible = False
.CommandBars("Standard").Visible = False
.CommandBars("Reviewing").Visible = False
ActiveWindow.DisplayHeadings = False
.DisplayFormulaBar = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
On Error GoTo 0
End Sub

--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Hide Scrollbars

hi.
I copied your code and it worked on my pc. using xp xl2003.
I changed all of the falses to trues and it put everything back.
so i am now officially stumped.

Sorry
FSt1

"blackbox via OfficeKB.com" wrote:

here's all the code, everything worksexcept the scrollbars

Sub RemoveToolbars()
On Error Resume Next
With ActiveWindow
.DisplayFullScreen = False
.CommandBars("Full Screen").Visible = False
.CommandBars("MyToolbar").Enabled = False
.CommandBars("MyToolbar").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars("Formatting").Visible = False
.CommandBars("Standard").Visible = False
.CommandBars("Reviewing").Visible = False
ActiveWindow.DisplayHeadings = False
.DisplayFormulaBar = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
On Error GoTo 0
End Sub

--
Message posted via http://www.officekb.com


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Hide Scrollbars

Well, the plot thickens...

I just tried the same code at home (Office XP)

and it hides the row/column headers and the scrollbars but nothing else.

I checked to make sure the menu bars and command bars all have the same names,
which they do, as what ever version of Office they use at work. ('97 I think)

So... I'm not quite sure where to go from here.

I have a copy of Office 2007 but have been hesitant to install it due to all
complaints about running slow or crashing when macros are run.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200706/1



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Hide Scrollbars

Remove the On Error Resume Next to see the real cause of the error.
Hint: Is a CommandBar a member of the ActiveWindow ?

NickHK

"blackbox via OfficeKB.com" <u20390@uwe wrote in message
news:73e8f7f1638cf@uwe...
Well, the plot thickens...

I just tried the same code at home (Office XP)

and it hides the row/column headers and the scrollbars but nothing else.

I checked to make sure the menu bars and command bars all have the same

names,
which they do, as what ever version of Office they use at work. ('97 I

think)

So... I'm not quite sure where to go from here.

I have a copy of Office 2007 but have been hesitant to install it due to

all
complaints about running slow or crashing when macros are run.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200706/1



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Hide Scrollbars

thanks for all your help.

I moved the scrollbar instructions to the top of the list and everything
works

NickHK wrote:
Remove the On Error Resume Next to see the real cause of the error.
Hint: Is a CommandBar a member of the ActiveWindow ?

NickHK

Well, the plot thickens...

[quoted text clipped - 9 lines]
I have a copy of Office 2007 but have been hesitant to install it due to all
complaints about running slow or crashing when macros are run.


--
Message posted via http://www.officekb.com

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
Scrollbars in Listbox Sri Excel Discussion (Misc queries) 2 August 13th 07 01:06 PM
Scrollbars [email protected] Excel Programming 0 January 19th 07 09:17 PM
Scrollbars & Userforms Keith S Excel Programming 2 January 21st 05 03:05 PM
ListBox Scrollbars Charles Excel Programming 0 January 22nd 04 03:41 PM
Getting rid of scrollbars for listbox Marcie Excel Programming 2 September 20th 03 11:15 PM


All times are GMT +1. The time now is 11:07 PM.

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"