Solved

Excel user form printing with preview!!!

Posted on 2003-11-04
9
585 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
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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 500 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Introduction Perhaps more familiar to developers who primarily use VBScript than to developers who tend to work only with Microsoft Office and Visual Basic for Applications (VBA), the Dictionary is a powerful and versatile class, and is useful …
Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

770 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