SQLSearcher
asked on
Excel New a worksheet in a macro
Hello Experts Exchange
I have a Excel 2010 spreadsheet that I want a macro to create a new worksheet and give it a name of import.
I have recorded a macro and have the following code;
However I am running the macro on many different Excel files, and Sheet1 maybe not be the new worksheet name in some files.
Can you provide the code I would need to create a new worksheet and rename it to import, please?
Regards
SQLSearcher
Regards
I have a Excel 2010 spreadsheet that I want a macro to create a new worksheet and give it a name of import.
I have recorded a macro and have the following code;
Sheets.Add After:=Sheets(Sheets.Count)
'Sheets("Sheet1").Select
'Sheets("Sheet1").Name = "Import"
However I am running the macro on many different Excel files, and Sheet1 maybe not be the new worksheet name in some files.
Can you provide the code I would need to create a new worksheet and rename it to import, please?
Regards
SQLSearcher
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Rgonzo,
Quick question.... if you fire this Macro multiple of times, will it use the same name followed by the copy number for each new worksheet?
B.
Quick question.... if you fire this Macro multiple of times, will it use the same name followed by the copy number for each new worksheet?
B.
ASKER