LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Resizing and Printing a UserForm

Hi,
I have a UserForm that I needed to print out on a 5'x8' sheet.
Currently I have (thanks to this forum)

Public Const VK_SNAPSHOT = 44
Public Const VK_LMENU = 164
Public Const KEYEVENTF_KEYUP = 2
Public Const KEYEVENTF_EXTENDEDKEY = 1
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As
Long)
sub main()
'deleted code
UserForm1.show
End Sub

Private Sub print_form_Click()
DoEvents
keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + _
KEYEVENTF_KEYUP, 0
keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY + _
KEYEVENTF_KEYUP, 0
DoEvents
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
Unload Me
End Sub

However, this is simply a screenshot and I can't seem to figure out
how to size it down (even with fooling with the numbers). Are there
any calculated or more exact resizing methods? Or maybe more
parameters I could include?

Thank you very much

-Andrew

 
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
auto-resizing UserForm window NickHK Excel Programming 2 January 11th 07 08:02 AM
auto-resizing UserForm window John Bundy Excel Programming 0 January 10th 07 05:15 PM
resizing listbox columns in excel userform u9946675 Excel Programming 1 November 3rd 06 03:43 PM
Resizing Userform to screen size Al@n Excel Programming 2 January 15th 06 09:26 PM
Userform resizing lmarks Excel Programming 5 August 4th 04 06:56 PM


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