Macro to add a named sheet

J

Just Merks

Hello,

I created a Macro which will be used by different users. In this macro I do
add a new sheet which I want to rename.
However based on the regional settings the new sheet will receive a
different name. I.e. in US a new sheet will be named "Sheet1" in Dutch it is
named "Blad1".
Can i directly add a new sheet with a name?

thank you,

Just
 
P

Pete_UK

You can do it like this:

Sheets.Add after:=Sheets(1)
ActiveSheet.Name = "Results"

This gives the sheet the name Results, and inserts it after the first
sheet.

Hope this helps.

Pete
 
B

Bob Phillips

Worksheets.Add(after:=Worksheets(Worksheets.Count)).Name = "mySheetname"


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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