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


Excel WorkBook has 2 worksheets in it. I want to set the VIEW Zoo
(i.e Magnification ) of the 1st Excel Worksheet to 70% and the 2n
Worksheet to 80% thru the code (C#).

I have tried using "objExcelWorkbook.Windows[1].Zoom = 80 ;" , but thi
will set the zoom percentage of only one worksheet.

I also tried setting the zoom on each Worksheet as follows :
objSheet1.PageSetup.Zoom = 70;
objSheet2.PageSetup.Zoom = 80;
But the above code will set the PageSetup Zoom (ie PrintPreview) bu
not the View Zoom.

Any Ideas, how to set the View - Zoom of both the Sheets

--
rejij
-----------------------------------------------------------------------
rejijo's Profile: http://www.msusenet.com/member.php?userid=138
View this thread: http://www.msusenet.com/t-187044058

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default C# Excel Doubt


ok , I got the solution :

for(int intSheetCtr =1; intSheetCtr <
objExcelWorkbook.Worksheets.Count ;intSheetCtr++) {
objExcelSheet
(Excel.Worksheet)objExcelWorkbook.Worksheets.get_I tem(intSheetCtr);
objExcelSheet.Activate();
if(intSheetCtr == 1)
objExcelWorkbook.Windows[1].Zoom = 70;
else if(intSheetCtr == 2)
objExcelWorkbook.Windows[1].Zoom = 80;


--
rejij
-----------------------------------------------------------------------
rejijo's Profile: http://www.msusenet.com/member.php?userid=138
View this thread: http://www.msusenet.com/t-187044058

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
Macros Doubt Royal Excel Discussion (Misc queries) 1 December 17th 09 09:51 AM
doubt nibu Excel Worksheet Functions 2 August 15th 08 05:57 PM
Excel Doubt Vasu Excel Discussion (Misc queries) 4 January 29th 08 01:39 AM
I have a doubt! Jaleel Excel Discussion (Misc queries) 4 September 21st 06 01:51 PM
some doubt mango Excel Worksheet Functions 6 December 31st 04 01:42 PM


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