Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody ,
iam new to excel vba development i have a problem ,any one can help me to sort this out Scenario: I have a workbook with 40 worksheets and i want to printout 15 sheets out of 40 with a common range eg( A10 to C30) i have to do it using vba with a command button ( it have to select those 15 pages )and i have to invoke a xldailogprint to choose the printer to print only those 15 pages thanks in advance , regards, prakash. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Prakesh
Try this changing the r1 as required: Sub printsheets() Const r1 As String = "C6:E12" ' range to print Const r0 As String = "" Dim s Dim si s = Array("All Bus Models", "Sheet5") ' sheets to print For Each si In s ' set print area Worksheets(si).PageSetup.PrintArea = r1 Next si Sheets(s).PrintOut Copies:=1, Collate:=True For Each si In s ' clear print area Worksheets(si).PageSetup.PrintArea = r0 Next si End Sub -- Hope this helps Martin Fishlock "prakash" wrote: Hi everybody , iam new to excel vba development i have a problem ,any one can help me to sort this out Scenario: I have a workbook with 40 worksheets and i want to printout 15 sheets out of 40 with a common range eg( A10 to C30) i have to do it using vba with a command button ( it have to select those 15 pages )and i have to invoke a xldailogprint to choose the printer to print only those 15 pages thanks in advance , regards, prakash. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel help needed | Excel Worksheet Functions | |||
Excel Help Needed | Excel Discussion (Misc queries) | |||
ActiveX Plugin needed in Excel 2000 missing from Excel 2003 | Excel Programming | |||
help needed with excel 97 | New Users to Excel | |||
VB code needed for running newer excel version macros in older excel versions | Excel Programming |