Renaming worksheets

A

andreashermle

Dear Experts:

I would like to rename the worksheet name tabs of the currently active
workbook as follows, using VBA

Original (Sheet 1)
Graphics (Sheet 2)
SAP (Sheet 3)
NoMatch (Sheet 4). This sheet has first to be created / inserted.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
 
J

James Ravenswood

Dear Experts:

I would like to rename the worksheet name tabs of the currently active
workbook as follows, using VBA

Original (Sheet 1)
Graphics (Sheet 2)
SAP (Sheet 3)
NoMatch (Sheet 4). This sheet has first to be created / inserted.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas

Something like:

Sub Andrea()
Sheets.Add after:=Sheets("Sheet3")
s = Array("Original", "Graphics", "SAP", "N0Match")
For i = 1 To 4
Sheets(i).Name = s(i - 1)
Next
End Sub
 
A

andreashermle

Something like:

Sub Andrea()
Sheets.Add after:=Sheets("Sheet3")
s = Array("Original", "Graphics", "SAP", "N0Match")
For i = 1 To 4
    Sheets(i).Name = s(i - 1)
Next
End Sub

Hi James,

great job. Exactly what I wanted. Thank you very much for your
professional help.

Regards, Andreas
 

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