LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Excel vba help needed

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.


 
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
Excel help needed Vinod Lewis Excel Worksheet Functions 6 August 12th 08 11:41 AM
Excel Help Needed w3rdy303 Excel Discussion (Misc queries) 4 July 14th 06 01:25 PM
ActiveX Plugin needed in Excel 2000 missing from Excel 2003 cadcam Excel Programming 0 July 13th 06 01:05 AM
help needed with excel 97 sithlord3k New Users to Excel 2 September 23rd 05 05:15 PM
VB code needed for running newer excel version macros in older excel versions Tom Excel Programming 6 October 16th 03 03:11 AM


All times are GMT +1. The time now is 01:19 PM.

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"