Create 2nd, 3rd , 4th worksheet and so on

S

Steved

Hello from Steved

I pickup the below from the newsgroup.

Please how to I add the extra worksheets another 8. I will name them
Roskill, Papakura, Wiri, Shore, Orewa, Swanson, Panmure and Waiheke.

Sub AddNameNewSheet2()
Dim CurrentSheetName As String
CurrentSheetName = ActiveSheet.Name
Sheets.Add
On Error Resume Next
ActiveSheet.Name = "City"
Do Until Err.Number = 0
Err.Clear
Loop
On Error GoTo 0
Sheets(CurrentSheetName).Select
End Sub
Thankyou.
 
B

Bob Phillips

Worksheets.Add.Name = "Roskill"
Worksheets.Add.Name = "Papakura"
Worksheets.Add.Name = "Wiri"
Worksheets.Add.Name = "Shore"
Worksheets.Add.Name = "Orewa"
Worksheets.Add.Name = "Swanson"
Worksheets.Add.Name = "Panmure"
Worksheets.Add.Name = "Waiheke"

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
S

Steved

Thankyou.

Bob Phillips said:
Worksheets.Add.Name = "Roskill"
Worksheets.Add.Name = "Papakura"
Worksheets.Add.Name = "Wiri"
Worksheets.Add.Name = "Shore"
Worksheets.Add.Name = "Orewa"
Worksheets.Add.Name = "Swanson"
Worksheets.Add.Name = "Panmure"
Worksheets.Add.Name = "Waiheke"

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Top