Add new sheets with code
Hi Toppers,
When I try to run this, I get an error, maybe I did this wrong, here is what
I did:Any suggestions
For i = 1 To 6
Sheets.Add
ActiveSheet.Name = Volunteers(i - 1)
ActiveSheet.Name = Plumbing(i - 2)
ActiveSheet.Name = Roofing(i - 3)
"Toppers" wrote:
Something like:
newsheets = Array("AllVolunteers", "Roofing", "Sidings")
For i = 1 To 3
Sheets.Add
ActiveSheet.Name = newsheets(i - 1)
Next i
HTH
"Linda" wrote:
I want to add additional sheets to my workbook with VBA. My workbook is
titled Habitat and I want to add the sheets titled "AllVolunteers",
"Roofing", "Siding". I have many more to add but if you can help me with
these, that would be great. I looked at my recorded macro code, but it isn't
working when I try to run it. Thank you
|