Multiple Worksheets: Add:Print

  • Thread starter Thread starter scorpion53061
  • Start date Start date
S

scorpion53061

Hi I am looking for a link/tutorial on multiple worksheets, how to add them,
address them as needed and then to print them. UP till now I have only used
one worksheet in what I have built.
 
Dim sh as Worksheet
set sh = Worksheets.Add( After:=worksheets(worksheets.count))
sh.Name = "mysheet2"
With worksheets("mysheet2")
.Range("A1").Interior.Colorindex = 6
.Printout
End With

or
sh.Range("A1").Interior.ColorIndex = 6
sh.printout

to print 2 sheets

Worksheets(Array(1,2)).Printout

Worksheets(Array("Sheet1","mysheet2")).Printout
 
... sounds like simple stuff - however I won't beable to recommend
specific tutorial, but I can give you some commands that will help yo
to start from :

to create a new sheet in the same workbook:
ActiveWorkbook.Sheets.Add Before:=Worksheets(Worksheets.Count)
set ws = ActiveSheet

to create a new workbook with just one sheet:
Set wb = Workbooks.Add (xlWBATWorksheet)

to print a Sheet
ActiveSheet.PrintOut
or
ws.PrintOut

cheers,
Pet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top