Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Code for Printing Options

Status
Not open for further replies.

Stev1parr

Technical User
Jan 1, 2010
15
US
I need assistance with a print code.

What I want to select columns and hide those columns. Then file print. When the print dialog box appears, I want to have the option to select From/To and number of copies. Then I need to option to preview or just print. If preview is chosen, I need the option to print or cancel before continuing to Columns("B:AZ").Select.

This is what I have so far with the exception of the print code is incorrect.

Columns("C:AY").Select
Range("C75").Activate
Selection.EntireColumn.Hidden = True
ActiveWindow.SelectedSheets.PrintOut From:=2, To:=2, Copies:=1, Preview _
:=True, Collate:=True
Columns("B:AZ").Select
Range("B72").Activate
Selection.EntireColumn.Hidden = False
Range("B76").Select
 
have a look at using
application.dialogs(xldialogprint).show

this displays the print dialog but i've never used this method so don't really know what clicking ok actually returns!

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top