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: 47
Default Approach to a Menu of Multiple Print Ranges

Stephen:

I guess I'm in over my head at this point. I don't have
any experience with list boxes. I guess I need someone to
point me to an online tutorial to where i can follow your
instructions better on how to go about setting this stuff
up.
-----Original Message-----
Hi Bruce,

I just need someone to get me started with some
code that might allow for manageing all these reports

that
I print each month a little easier. In summary for the
sake of discussion, there are six different

subcategories
with each subcategories having two or more separate

print
ranges to print each month.


In that case, I would have a separate sheet somewhere

(called
shtLookup, say) that contains a table listing the

category,
subcategory, sheet and range to print for each report:

A B
1 Category 1
2 Report 1.1 Sheet1!A1:G20
3 Report 1.2 Sheet1!A21:G30
4 Category 2
5 Report 2.1 Sheet2!A1:H30

Then just have a userform containing a 2-column (with

ColumnWidth of ;0
to hide the second column) multi-select list box and an

Print button.
Your form would then have the code:

Private Sub UserForm_Initialize()
lbReports.List = ThisWorkbook.Worksheets("shtLookup")

_
.Range("A1").CurrentRegion
End Sub

Private Sub btnPrint_Click()

Dim i As Integer

With lbReports
For i = 0 To .ListCount
If .Selected(i) And .List(i, 1) < "" Then
Range(.List(i, 1)).PrintOut
End If
Next
End With

End Sub



Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk

.

 
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
Print Menu Chris New Users to Excel 1 April 13th 09 03:17 AM
Setting multiple ranges to print bluegrassstateworker Excel Discussion (Misc queries) 0 May 1st 07 08:21 PM
Print Area ranges print on separate pages? Lyndon Excel Discussion (Misc queries) 1 December 29th 06 05:22 PM
print menu Murch Excel Discussion (Misc queries) 0 August 22nd 06 11:06 PM
Multiple Print Ranges on one Worksheet Willis Excel Worksheet Functions 2 December 16th 04 10:33 AM


All times are GMT +1. The time now is 09:43 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"