Solved

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

Posted on 2011-09-20
5
296 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 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

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

737 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