Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Sheets and Naming
Hello.
I want to insert a sheet and then name it. That part is done, and not the problem. Sheets.Add Sheets("Sheet1").Name = "TransposedVB" What happens is the code provides a specific name to the newly inserted sheet. (In this case, Sheet1.) If the user deletes that sheet for whatever reason, while the workbook is still open, when you add the next sheet it will be now named Sheet2, thus breaking the code. The user would have to close the workbook and reopen it to execute the code again and have it work. So, bascially what I'm looking for is the proper syntax (x + 1?) for adding the new sheet each time Excel changes the Sheet name allowing me to rename it. I know this is relatively easy, but I'm having a brain lapse at the moment. Any help would be greatly appreciated. Thanks. Dan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
a quick way of inserting and naming multiple worksheets in Excel? | Excel Worksheet Functions | |||
Naming sheets from a cell value | Excel Discussion (Misc queries) | |||
VBA Help naming sheets | Excel Discussion (Misc queries) | |||
Naming Sheets for day of the month | Excel Discussion (Misc queries) |