Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro
I have a command button that runs a macro. The macro copies a worksheet
template and renumbers it. The problem is that I would like the worksheets to be numbered in sequence i.e. 01, 02, 03 etc. The line below is an extract from the macro. Sheets("Template (2)").Name "1" Ca you please advise how to change this line so that each time the command button is pressed the next number is allocated in sequence. Many thanks for your assistance. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro
Sheets("Template (2)").Name = Format(Worksheets.Count - 1, "00")
Regards, Stefi zephyr ezt *rta: I have a command button that runs a macro. The macro copies a worksheet template and renumbers it. The problem is that I would like the worksheets to be numbered in sequence i.e. 01, 02, 03 etc. The line below is an extract from the macro. Sheets("Template (2)").Name "1" Ca you please advise how to change this line so that each time the command button is pressed the next number is allocated in sequence. Many thanks for your assistance. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro
Stefi
Many thanks you're solution worked. Zephhyr "Stefi" wrote: Sheets("Template (2)").Name = Format(Worksheets.Count - 1, "00") Regards, Stefi zephyr ezt *rta: I have a command button that runs a macro. The macro copies a worksheet template and renumbers it. The problem is that I would like the worksheets to be numbered in sequence i.e. 01, 02, 03 etc. The line below is an extract from the macro. Sheets("Template (2)").Name "1" Ca you please advise how to change this line so that each time the command button is pressed the next number is allocated in sequence. Many thanks for your assistance. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro
You are welcome! Thanks for the feedback!
Stefi zephyr ezt *rta: Stefi Many thanks you're solution worked. Zephhyr "Stefi" wrote: Sheets("Template (2)").Name = Format(Worksheets.Count - 1, "00") Regards, Stefi zephyr ezt *rta: I have a command button that runs a macro. The macro copies a worksheet template and renumbers it. The problem is that I would like the worksheets to be numbered in sequence i.e. 01, 02, 03 etc. The line below is an extract from the macro. Sheets("Template (2)").Name "1" Ca you please advise how to change this line so that each time the command button is pressed the next number is allocated in sequence. Many thanks for your assistance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
Compiling macro based on cell values | Excel Discussion (Misc queries) | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Highlight Range - wrong macro, please edit. | Excel Worksheet Functions |