• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Looping In Excel Vba

pencari

New Member
Hi guys

i am trying to make a looping process

i have read the looping tutorial etc, but i cant understand it

i am trying to make printing with vba using loops that the user define which page that i want to print by define it at 2 input box,

example printfrom = 1 and printto = 30

sorry for my bad english

and thanks before for helping
 
Hi,
You can use something like
Code:
Sub Print_Specific_Pages()
'Prints page x to page x
'You tell Excel which pages you want to print - i.e. pages 1 to 5; pages 4 to 7; etc.
'Replace the 5 with the page number from which you would like to start printing
'Replace the 10 with the page number to which you would like to print in Excel

Worksheets.PrintOut from:=5, to:=10

End Sub

If you are looking for other examples of printing see link below:
http://www.excelhowto.com/macros/print-worksheets-vba/

Hope this help!
 
Back
Top