Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default UserForm: how to print it landscape

Hi,
If I print the userform out, it comes as 'portrait'
Can anyone tell me how to print 'landscape' and centralised on the page?
Thanks folks
Gabor


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default UserForm: how to print it landscape

I think you have to choose the orientation in the printer dialog, using the
printer's properties.
HTH
Ruedi
"Gabor" schrieb im Newsbeitrag
...
Hi,
If I print the userform out, it comes as 'portrait'
Can anyone tell me how to print 'landscape' and centralised on the page?
Thanks folks
Gabor




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default UserForm: how to print it landscape

Rudi,
That does not work with a UserForm though.
Somehow the default printing out format of a userform is 'portrait'. I
cannot change it to 'landscape,
Maybe there is an option with newer version than mine (Excel'97).
Gabor
"Rudolf Sommer" schrieb im Newsbeitrag
...
I think you have to choose the orientation in the printer dialog, using

the
printer's properties.
HTH
Ruedi
"Gabor" schrieb im Newsbeitrag
...
Hi,
If I print the userform out, it comes as 'portrait'
Can anyone tell me how to print 'landscape' and centralised on the page?
Thanks folks
Gabor






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UserForm: how to print it landscape

Following code was posted previously by Orlando Magalhaes Filho:

In a general module put in these declarations/code:

Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Public Const VK_SNAPSHOT = &H2C

Sub Test()
UserForm1.Show
End Sub


In the code module of the Userform:

Private Sub CommandButton1_Click()
keybd_event VK_SNAPSHOT, 0, 0, 0
Workbooks.Add
Application.Wait Now + TimeValue("00:00:01")
ActiveSheet.PasteSpecial Format:="Bitmap", Link:=False,
DisplayAsIcon:=False
ActiveSheet.Range("A1").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
ActiveWorkbook.Close False
End Sub


This takes a "picture" of the userform and pastes it on a sheet. It then
prints the picture on the sheet. You should be able to modify it to get
the print settings you want.

Regards,
Tom Ogilvy


"Gabor" wrote in message
...
Rudi,
That does not work with a UserForm though.
Somehow the default printing out format of a userform is 'portrait'. I
cannot change it to 'landscape,
Maybe there is an option with newer version than mine (Excel'97).
Gabor
"Rudolf Sommer" schrieb im

Newsbeitrag
...
I think you have to choose the orientation in the printer dialog, using

the
printer's properties.
HTH
Ruedi
"Gabor" schrieb im Newsbeitrag
...
Hi,
If I print the userform out, it comes as 'portrait'
Can anyone tell me how to print 'landscape' and centralised on the

page?
Thanks folks
Gabor








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
cannot get excel sheet to print landscape even when set landscape williedon Setting up and Configuration of Excel 1 August 2nd 06 12:18 AM
won't print in landscape mike Excel Discussion (Misc queries) 1 January 9th 06 06:24 PM
Print "Landscape" in Explorer pappadude Excel Discussion (Misc queries) 1 September 28th 05 02:23 PM
Landscape print uj Excel Programming 0 January 23rd 04 08:24 PM
print a form landscape Dave[_32_] Excel Programming 0 December 17th 03 05:00 PM


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