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

I'm trying to write a macro that will allow me to toggle between Portrait &
Landscape modes.

I know this should be simple, but I'm missing something.

Please assist.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Print Orientation Toggle

Hi Alan

Sub PrintToggle()
With ActiveSheet.PageSetup
If .Orientation = xlPortrait Then
..Orientation = xlLandscape
Else
..Orientation = xlPortrait
End If
End With
End Sub

--
XL2002
Regards

William



"Alan Tolkoff" <Alan
wrote in message
...
| I'm trying to write a macro that will allow me to toggle between Portrait
&
| Landscape modes.
|
| I know this should be simple, but I'm missing something.
|
| Please assist.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Print Orientation Toggle

Alan

Sub Toggle_Orient()
With ActiveSheet.PageSetup
If .Orientation = xlLandscape Then
.Orientation = xlPortrait
Else
.Orientation = xlLandscape
End If
End With
End Sub

Gord Dibben Excel MVP
On Mon, 13 Dec 2004 17:05:01 -0800, Alan Tolkoff <Alan
wrote:

I'm trying to write a macro that will allow me to toggle between Portrait &
Landscape modes.

I know this should be simple, but I'm missing something.

Please assist.


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
Orientation Landscape but want Page #s to Print Portrait vcollins Excel Discussion (Misc queries) 1 November 15th 07 11:58 PM
Why does my page orientation change when I print? TRosa Excel Discussion (Misc queries) 2 August 13th 06 11:41 PM
print form orientation Burt[_2_] Excel Programming 0 October 30th 03 02:01 PM
Print Landscape AND Portrait Orientation in ONE Worksheet Paul Martin[_4_] Excel Programming 1 July 16th 03 01:17 PM
Print Landscape AND Portrait Orientation in ONE Worksheet Paul Martin Excel Programming 0 July 15th 03 11:21 PM


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