Thread: Macro
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
zephyr zephyr is offline
external usenet poster
 
Posts: 36
Default 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.