?
Solved

How do I get the results of the Excel VBA printer dialog box?

Posted on 2011-09-20
5
Medium Priority
?
315 Views
Last Modified: 2012-05-12
Hi - I was wondering how do I retrieve the printer selected by the user in the excel vba printer dialog box (Application.Dialogs(xlDialogPrint).Show)?

There are multiple reports to print out and I only want the user to have to select the printer once.

Thanks - Zack
0
Comment
Question by:zack4x4
[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
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
jason987 earned 2000 total points
ID: 36568615
Application.ActivePrinter  seems to be what you are looking for.
0
 
LVL 4

Author Comment

by:zack4x4
ID: 36568704
Does that change if the user selects a different printer in the dialog box?
0
 
LVL 5

Expert Comment

by:jason987
ID: 36568726
Yes, if they had selected the printer and hit "ok".
0
 
LVL 5

Expert Comment

by:jason987
ID: 36568735
I don't know the exact point in which it updates the variable.  As in I don't know if as they are scrolling though them if it changes.
0
 
LVL 4

Author Closing Comment

by:zack4x4
ID: 36569401
Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

777 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