Solved

Excel user form printing with preview!!!

Posted on 2003-11-04
9
673 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
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: …

717 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