Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Sheets("Template (2)").Name = Format(Worksheets.Count - 1, "00")

Regards,
Stefi


„zephyr†ezt írta:
 
You are welcome! Thanks for the feedback!
Stefi


„zephyr†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Macro 3
Macro Help 1
Macro to duplicate row based on cell value 0
Macro to create a list 5
Importing data from Excel worksheet into Excel template 2
VBA help 2
Excel Sequential Numbering System 0
Help to create a macro 2

Back
Top