Creating a Worksheet in VBA

  • Thread starter Thread starter Jako
  • Start date Start date
J

Jako

Hello,

Could anyone please tell me how i can create a new worksheet calle
"Acorn" and have the Tab coloured Orange.

Also in a seperate routine i want to change the Tab colour to blue i
cell A17 contains data.

Thanks in advance
 
Try this

Sub test()
On Error Resume Next
Worksheets.Add.Name = "Acorn"
Sheets("Acorn").Tab.ColorIndex = 46
On Error GoTo 0
End Sub

Blue = 5
 

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