?
Solved

Excel user form printing with preview!!!

Posted on 2003-11-04
9
Medium Priority
?
723 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
New style of hardware planning for Microsoft Exchange server.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

800 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