Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel user form printing with preview!!!

Posted on 2003-11-04
9
Medium Priority
?
777 Views
Last Modified: 2008-03-17
Hi all.

I have created some forms on Excel with all the codes.
Results are displayed on forms.

does anyone has a sample code to structure a customized printing of contents of the userform on A4 paper together with preview?

Need it urgently.

Thanks!!

0
Comment
Question by:cappoxy1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 3

Expert Comment

by:ehout
ID: 9714609
If this is still an issue:

Could you please give some more details?
I'm not quite sure what you mean.

You mode some VBA forms? You want to print those? What needs to be customized?
And you want a preview of this form to be printed?

Kind regards
0
 

Author Comment

by:cappoxy1234
ID: 9716490
HI..

basically, I have some forms with scroll bars. When you use printform, it usually prints only the visible area.
Is there any way to print the whole contents of the form?

Thanks.

0
 
LVL 3

Expert Comment

by:ehout
ID: 9720695
Are those scrollbars on the form itselves or are they only scrolling some multiline textboxes?

Kind regards
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:cappoxy1234
ID: 9720874
They are on the form itself.
0
 
LVL 3

Expert Comment

by:ehout
ID: 9721046
OK,

I do not have a customised print function, but when it's just printing the form, maybe you could do it quick and dirty by resizing the form for a while.

eg:

Sub PrintTheForm()
  Dim dblHeight#
  dblHeight = UserForm1.Height
' replace 323 by the height of your own form
  UserForm1.Height = 323
  UserForm1.PrintForm
  UserForm1.Height = dblHeight
End Sub

It's not the most sophisticated solution, but this way you're at least able to print the whole form.
(you needed it urgent).

Kind regards
0
 

Author Comment

by:cappoxy1234
ID: 9780126
Sorry.. doesn't work.. it only prints one page... how can I print page 2, 3 and so on!!

Thanks
0
 
LVL 3

Expert Comment

by:ehout
ID: 9780210
???? What other pages?
Maybe you should clarify a bit more what you're trying to do?

Kind regards
0
 

Author Comment

by:cappoxy1234
ID: 9784630
Well... maybe i haven't made myself clear.

a user form can have infinite scroll height (or very huge).
I have tried to change the scroll height to 0 so that it displays the whole contents of the form and then I print the form using printform.
However, the contents of my userform is longer than a standard page on a printer.  When printform is used, it only tried to print the form in one page regardless of whether the contents is going to be longer than a page. in other words, it only prints whatever that can be fit on one standard page and ignore the rest of the contents of the form!!!

I hope I have made mysefl clear.

0
 
LVL 3

Accepted Solution

by:
ehout earned 2000 total points
ID: 9785687
Ah, OK,

This indeed clears things up.
Well, as far as I can see you have 2 options.

1) use a third party product, for example:
http://www.visual-basic-solutions.com/easyprint/?AfID=8687

2) Use the WorkAround that Microsoft gives in:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q230/5/02.asp&NoWebContent=1

Hope this helps,
Kind regards
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question