Solved

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

Posted on 2011-09-20
5
245 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
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
jason987 earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

706 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

18 Experts available now in Live!

Get 1:1 Help Now