Worksheet add

  • Thread starter Thread starter lwm
  • Start date Start date
L

lwm

I am using the following to add worksheets to the active workbook.

ActiveWorkbook.Worksheets.Add

This works except it always adds to the far left.

How do I add new worksheets so that they go from left to right?

What I have done is written a macro that adds up to 15 worksheets and allows
the user to input the header, Tab name and then formats the header and footer
for each new sheet. This makes left to right most usful.



Thanks
 
don't use both of these, just 2 examples


Sub test()
Dim wsnew As Worksheet
Set wsnew = Worksheets.Add(after:=Worksheets(Worksheets.Count))
Set wsnew = Worksheets.Add(after:=Worksheets("Sheet2"))
End Sub
 
hi
see if this might work for you
ActiveWorkbook.Sheets.Add After:= _
Worksheets(Worksheets.Count)
regards
FSt1
 

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