Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Naming Worksheets With Leading Zeros

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Naming Worksheets With Leading Zeros

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

--
Regards
Frank Kabel
Frankfurt, Germany


Mike Taylor wrote:
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
leading zeros Dave[_11_] New Users to Excel 5 July 25th 09 08:44 AM
Leading Zeros JSpence2003 Excel Discussion (Misc queries) 2 November 14th 07 09:28 PM
Leading zeros LeePotts Excel Discussion (Misc queries) 2 August 17th 05 02:46 PM
Leading zeros Paul Excel Discussion (Misc queries) 4 June 12th 05 04:04 AM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM


All times are GMT +1. The time now is 11:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"