Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Rename active sheet

I am trying to rename the active sheet from a cell in the sheet. Th
cell has a date. The cell has a date format of mm-dd-yy which is how
want the sheet to be renamed. When using Selection.Copy the dat
format is mm/dd/yy. So when i attempt to rename the sheet it cannot b
renamed since the date format has special characters.

Selection.Copy
ActiveSheet.Select
'ActiveSheet.Name = "01-05-04"
ActiveSheet.Name = Selection

ActiveSheet.Name = "01-05-04" is the correct format but cannot be use
since it will be in a Loop. Using Selection formats the date a
mm/dd/yy.

Is there a way to format Selection as mm-dd-yy

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Rename active sheet

Try this

ActiveSheet.Name = Format(Range("A1"), "mm-dd-yy")


--
Regards Ron de Bruin
http://www.rondebruin.nl


"lumaduc " wrote in message ...
I am trying to rename the active sheet from a cell in the sheet. The
cell has a date. The cell has a date format of mm-dd-yy which is how I
want the sheet to be renamed. When using Selection.Copy the date
format is mm/dd/yy. So when i attempt to rename the sheet it cannot be
renamed since the date format has special characters.

Selection.Copy
ActiveSheet.Select
'ActiveSheet.Name = "01-05-04"
ActiveSheet.Name = Selection

ActiveSheet.Name = "01-05-04" is the correct format but cannot be used
since it will be in a Loop. Using Selection formats the date as
mm/dd/yy.

Is there a way to format Selection as mm-dd-yy?


---
Message posted from http://www.ExcelForum.com/



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
how do i rename a sheet if the rename tab is inactive? Nelson Excel Worksheet Functions 1 March 3rd 10 10:28 AM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
Move data to new sheet - rename sheet based on criteria ? [email protected] Excel Discussion (Misc queries) 7 May 16th 07 10:22 PM
Rename active sheet Ginny[_2_] Excel Programming 2 January 9th 04 10:59 PM
Rename Active Sheet Jason[_25_] Excel Programming 2 September 21st 03 02:03 AM


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

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

About Us

"It's about Microsoft Excel"