ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Rename a Blank Sheet that a macro Creates (https://www.excelbanter.com/excel-programming/318384-how-rename-blank-sheet-macro-creates.html)

Darin Kramer

How to Rename a Blank Sheet that a macro Creates
 

Howdie,

I have a Macro that goes into a Distribution list (sheet within excel),
selects certain people based on a criteria, copys that info, Inserts a
new sheet and pastes that info into the new sheet. I want to be able to
specify the name of the sheet that it creates (instead of just being a
consecutive sheet number) Ideas will be most welcome...

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Fogey

How to Rename a Blank Sheet that a macro Creates
 
If the new sheet is active:
ActiveSheet.Name="New Name"

Mike F
"Darin Kramer" wrote in message
...

Howdie,

I have a Macro that goes into a Distribution list (sheet within excel),
selects certain people based on a criteria, copys that info, Inserts a
new sheet and pastes that info into the new sheet. I want to be able to
specify the name of the sheet that it creates (instead of just being a
consecutive sheet number) Ideas will be most welcome...

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




JE McGimpsey

How to Rename a Blank Sheet that a macro Creates
 
One way:

ThisWorkbook.Worksheets.Add(After:=Sheets(Sheets.C ount)).Name = "foo"


In article ,
Darin Kramer wrote:

Howdie,

I have a Macro that goes into a Distribution list (sheet within excel),
selects certain people based on a criteria, copys that info, Inserts a
new sheet and pastes that info into the new sheet. I want to be able to
specify the name of the sheet that it creates (instead of just being a
consecutive sheet number) Ideas will be most welcome...

Thanks

D


Darin Kramer

How to Rename a Blank Sheet that a macro Creates
 

Thanks!! Works perfectly!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 04:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com