Solved

Excel user form printing with preview!!!

Posted on 2003-11-04
9
541 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
  • 5
  • 4
9 Comments
 
LVL 3

Expert Comment

by:ehout
Comment Utility
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
Comment Utility
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
Comment Utility
Are those scrollbars on the form itselves or are they only scrolling some multiline textboxes?

Kind regards
0
 

Author Comment

by:cappoxy1234
Comment Utility
They are on the form itself.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 3

Expert Comment

by:ehout
Comment Utility
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
Comment Utility
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
Comment Utility
???? What other pages?
Maybe you should clarify a bit more what you're trying to do?

Kind regards
0
 

Author Comment

by:cappoxy1234
Comment Utility
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 500 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now