Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Page Setup not selecting

I have the following code in one of my macros. The code works and changes
the "Fit to " fields in the Page Setup up, but it doesn't select that I want
it to apply that way on the sheet. It changes the fit to but leaves the
"Adjust to" radio button selected. How do I have the code select the "Fit
to" option?

With Sheets(1).PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 500
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Page Setup not selecting

Sub AD()
With Sheets(1).PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 500
End With

End Sub

--
Regards,
Tom Ogilvy


"Josh O." wrote in message
...
I have the following code in one of my macros. The code works and changes
the "Fit to " fields in the Page Setup up, but it doesn't select that I

want
it to apply that way on the sheet. It changes the fit to but leaves the
"Adjust to" radio button selected. How do I have the code select the "Fit
to" option?

With Sheets(1).PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 500
End With



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default Page Setup not selecting

Add the following line before setting the other properties
.Zoom = False
Alok Joshi

"Josh O." wrote:

I have the following code in one of my macros. The code works and changes
the "Fit to " fields in the Page Setup up, but it doesn't select that I want
it to apply that way on the sheet. It changes the fit to but leaves the
"Adjust to" radio button selected. How do I have the code select the "Fit
to" option?

With Sheets(1).PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 500
End With

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Page Setup not selecting

Thanks Tom. I knew it was something easy.

"Tom Ogilvy" wrote:

Sub AD()
With Sheets(1).PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 500
End With

End Sub

--
Regards,
Tom Ogilvy


"Josh O." wrote in message
...
I have the following code in one of my macros. The code works and changes
the "Fit to " fields in the Page Setup up, but it doesn't select that I

want
it to apply that way on the sheet. It changes the fit to but leaves the
"Adjust to" radio button selected. How do I have the code select the "Fit
to" option?

With Sheets(1).PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 500
End With




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
Page layout - page setup - items disabled Bill D - Hubbard & Co Excel Discussion (Misc queries) 6 February 2nd 10 04:34 PM
FORMAT EXCEL WORKBOOK (PAGE SETUP) ALL AT ONCE INSTEAD OF BY PAGE fred Excel Discussion (Misc queries) 1 August 11th 08 04:54 PM
Page Setup when saving a worksheet as a web page pattyw Excel Discussion (Misc queries) 3 July 29th 08 09:25 PM
HOW DO I SETUP A PAGE IN EXCEL TO GIVE TOTALS TO ANOTHER PAGE Randy Excel Worksheet Functions 1 February 8th 07 06:15 PM
Under Page Setup the page option of Ledger - for Office XP Turbo Excel Discussion (Misc queries) 2 September 27th 06 02:46 AM


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