Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Zoom to fit the page width

Hi,

I have an excel workbook with multiple sheets. It is been used on different
computers and I would like my workbook to zoom always to right screen width.
How can I do this?

I have freezed panes on top of every sheet with a background picture that
has a width of 33,52 cm. I would like to have screen fitted always to that
width.

I have been trying following code in ThisWorkbook but it doesn't work at
all. It only opens the coversheet and zooms it and has no effect on any other
sheet.

Private Sub Workbook_Open()

Me.Sheets("Cover").Activate
Application.ActiveSheet.Range("A1:M6").Select
Application.ActiveWindow.Zoom = True
Me.Range("A7").Select

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Zoom to fit the page width


Well, ActiveSheet only applies to the active sheet. <g
Try the following slightly modified code using the Activate event instead of the Open event.
'--
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Sh.Range("A1:M6").Select
Application.ActiveWindow.Zoom = True
Sh.Range("A7").Select
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"DaveFinn"
wrote in message
Hi,
I have an excel workbook with multiple sheets. It is been used on different
computers and I would like my workbook to zoom always to right screen width.
How can I do this?
I have freezed panes on top of every sheet with a background picture that
has a width of 33,52 cm. I would like to have screen fitted always to that
width.
I have been trying following code in ThisWorkbook but it doesn't work at
all. It only opens the coversheet and zooms it and has no effect on any other
sheet
..
Private Sub Workbook_Open()
Me.Sheets("Cover").Activate
Application.ActiveSheet.Range("A1:M6").Select
Application.ActiveWindow.Zoom = True
Me.Range("A7").Select
End Sub
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
No zoom to page option ??? Blue Max New Users to Excel 5 April 11th 10 03:19 AM
change zoom based on column width michalaw Excel Discussion (Misc queries) 2 August 11th 09 09:37 PM
How to print fitted 1 page width and 1 page tall SupperDuck Excel Programming 1 June 29th 06 09:33 PM
How do you set default page break preview zoom to 100%? Tswiech Setting up and Configuration of Excel 0 June 27th 06 02:33 PM
Print setup - fit to page - zoom Zurn[_57_] Excel Programming 3 May 8th 06 11:51 AM


All times are GMT +1. The time now is 04:24 AM.

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

About Us

"It's about Microsoft Excel"