|
-
Apr 30th, 2006, 04:28 PM
#1
Printing VB Userform in Excel
Hi
i want to print the userform created in excel. the command that i am using is
userform.printform
the problem is that the userform is so big that it is not fitting in one page. is there any way i can change the orientation to 'landscape' (using vbcode) and then take a print of the current userform??? or is there any other way to print it?
thanks
more info: the height of userform is 405 and width is 725. there is a commandbutton in the userform that uses the above code to print the userform. it does print perfectly. it's just that it takes two pages to print...
Last edited by Siddharth Rout; May 3rd, 2006 at 07:38 AM.
Reason: more info added
-
May 3rd, 2006, 01:39 PM
#2
Re: Printing VB Userform in Excel
There is no standard support for this bt you may be able to work around it by using some APIs like BitBlt to resize the image and fit it to a single page. I am not familiar enough with it to provide an example but here is a link for the API.
http://www.allapi.net/apilist/BitBlt.shtml
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 3rd, 2006, 03:37 PM
#3
Re: Printing VB Userform in Excel
thanks rob
i visited the site but everything went qbove my head
so i tried the most common way. i simply typed "printing userforms in excel" in google and searched. i was surprised by the links it pulled up. seems like i am not the only one who is facing this problem
anyways i just had a thought. i am not sure if this is possible.... can we change the orientation on the printer properties in Control Panel|Printer to landscape and back to potrait through VB code????
I am sure there definitley has to be a way....
I am still searching the web. in case i come across anything, i'll definitely update this thread...
Thanks once again...
-
May 3rd, 2006, 03:42 PM
#4
Re: Printing VB Userform in Excel
I JUST FOUND SOME THING THAT MIGHT HELP....
WILL GIVE IT A TRY AND SEE IF IT WORKS....
http://groups.google.com/group/micro...652a998c2a44c4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|