PDA

View Full Version : Moving sheets in a workbook



schroederd1
09-22-2011, 09:16 AM
I've recorded this macro but when I run it, it doesn't work.

Sheets("Nate").Select
Sheets.add
Sheets("Sheet11").Select
Sheets("Nate").Select
Sheets("Nate").Move Before:=Sheets(11)
Sheets("Sheet11").Select

I just want to move the Nate sheet in front of sheet 11

What I really need to know is how to add a sheet at the end of a workbook. When I insert it always adds it before the sheet I'm on.

Thanks,

mancubus
09-22-2011, 09:52 AM
hi and wellcome to vbax.


Worksheets.Add (After:=Worksheets(Worksheets.Count))

mancubus
09-22-2011, 09:53 AM
to add three worksheets use

Worksheets.Add After:=Worksheets(Worksheets.Count), Count:=3

mancubus
09-22-2011, 09:55 AM
and

Sheets("Nate").Move Before:=Sheets("Sheet11")


or by sheet codename

Sheets("Nate").Move Before:=Sheet11