Naming Worksheets With Leading Zeros

  • Thread starter Thread starter Mike Taylor
  • Start date Start date
M

Mike Taylor

Cell "A1" contains a number, say "10". The number format of that cell
is a custom number format ("000"). The value is displayed as "010" in
cell "A1".

Is there any code that will name the wrksht using the number in cell
"A1" and display that name on the tab as "010" rather than "10"? TIA

Mike Taylor
 
Hi
try something like
activesheet.name = format(Range("A1").value,"000")
 

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

Back
Top