LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro to print specified range of several work sheets

Thanks for this.

What I am after is a way to select the range of worksheets you want to
print therefore not always set to print all worksheets.

So far I have got this far by setting up a userform with a combobox
and command button that allows me to select a single worksheet (though
the code doesn't actually work as the command button doesn't bring up
the print menu!). What I would like is 2 seperate combo boxes 1) print
worksheet FROM and 2) print worksheet TO, thereby specifying a range
that can be chjanged each time.

Private Sub CommandButton1_Click()
ThisWorkbook.Sheets(Me.ComboBox1.Text).PrintOut Copies:=1,
Collate:=True
End Sub

Private Sub UserForm_Initialize()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Sheets
Me.ComboBox1.AddItem ws.Name
Next
End Sub

any pointers, as always greatly appreciated

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to print multiple work sheets using vba prakash Excel Discussion (Misc queries) 1 November 24th 06 06:58 AM
Print page 1 of all work sheets?? Rajula Excel Discussion (Misc queries) 5 May 30th 06 03:26 PM
HOW TO: One name range to work for multiple sheets Kevin McCartney Excel Programming 0 November 16th 05 10:16 PM
HOW TO: One name range to work for multiple sheets Dan Thompson Excel Programming 0 November 16th 05 10:04 PM
Need Help w/ Print Macro to Print All Visible Sheets (including Charts) in a Workbook will Excel Programming 3 September 23rd 04 08:05 PM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"