Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting zoom of 2 sheets equal


Hello,
I'm trying to set the zoom value of one sheet ("Sheet2") in a workbook
equal to the zoom value of another sheet ("Sheet1") each time Sheet1 is
activated. I've tried the code below, but z is equal to 60 when
Sheet1's zoom is 80%, and it doesn't change Sheet2's zoom value. What
am I doing wrong? Thanks!

Dim z As Integer
z = Worksheets("Sheet1").PageSetup.Zoom
Worksheets("Sheet2").PageSetup.Zoom = z


--
jbl25
------------------------------------------------------------------------
jbl25's Profile: http://www.excelforum.com/member.php...fo&userid=7225
View this thread: http://www.excelforum.com/showthread...hreadid=382790

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting zoom of 2 sheets equal

Pagesetup is for printing

worksheets("Sheet1").Activate
z = Activewindow.Zoom
Worksheets("Sheet2").Activate
ActiveWindow.Zoom = z

--
Regards,
Tom Ogilvy


"jbl25" wrote in
message ...

Hello,
I'm trying to set the zoom value of one sheet ("Sheet2") in a workbook
equal to the zoom value of another sheet ("Sheet1") each time Sheet1 is
activated. I've tried the code below, but z is equal to 60 when
Sheet1's zoom is 80%, and it doesn't change Sheet2's zoom value. What
am I doing wrong? Thanks!

Dim z As Integer
z = Worksheets("Sheet1").PageSetup.Zoom
Worksheets("Sheet2").PageSetup.Zoom = z


--
jbl25
------------------------------------------------------------------------
jbl25's Profile:

http://www.excelforum.com/member.php...fo&userid=7225
View this thread: http://www.excelforum.com/showthread...hreadid=382790



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Setting zoom of 2 sheets equal

Do you actually want to change the print zoom, or the view zoom? To change the view zoom:

Dim z As Integer
Worksheets("Sheet1").Activate
z = ActiveWindow.Zoom
Worksheets("Sheet2").Activate
ActiveWindow.Zoom = z

HTH,
Bernie
MS Excel MVP


"jbl25" wrote in message
...

Hello,
I'm trying to set the zoom value of one sheet ("Sheet2") in a workbook
equal to the zoom value of another sheet ("Sheet1") each time Sheet1 is
activated. I've tried the code below, but z is equal to 60 when
Sheet1's zoom is 80%, and it doesn't change Sheet2's zoom value. What
am I doing wrong? Thanks!

Dim z As Integer
z = Worksheets("Sheet1").PageSetup.Zoom
Worksheets("Sheet2").PageSetup.Zoom = z


--
jbl25
------------------------------------------------------------------------
jbl25's Profile: http://www.excelforum.com/member.php...fo&userid=7225
View this thread: http://www.excelforum.com/showthread...hreadid=382790



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
Setting the zoom size of a new window from 100% to 75% MongoMan Excel Discussion (Misc queries) 0 June 18th 08 11:30 PM
Setting Default Zoom Rawle Excel Discussion (Misc queries) 1 August 15th 07 12:33 PM
setting of screen zoom in excel Sunantoro Excel Discussion (Misc queries) 1 September 13th 05 05:03 PM
Value of Zoom print setting Dave Peterson[_3_] Excel Programming 0 July 18th 03 04:38 AM
Setting zoom for all worksheet pages skmr3 Excel Programming 0 July 15th 03 02:53 AM


All times are GMT +1. The time now is 10:01 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"