Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to use macro to rename worksheet with date +"text"

What context must I use to rename a worksheet tab with the the current date

I have success with naming it in a macro with text using
ActiveSheet.Selec
ActiveSheet.Name = "HD

I would like tab to be named "Date-HD" but the TODAY() function doesn't work.....

Thanks for your input
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How to use macro to rename worksheet with date +"text"

Hi
try
ActiveSheet.Name = Format(date,"mmddyyy") & "-HD"


--
Regards
Frank Kabel
Frankfurt, Germany


Sherri wrote:
What context must I use to rename a worksheet tab with the the
current date?

I have success with naming it in a macro with text using:
ActiveSheet.Select
ActiveSheet.Name = "HD"

I would like tab to be named "Date-HD" but the TODAY() function
doesn't work......

Thanks for your input

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to use macro to rename worksheet with date +"text"

hi Frank

I tweaked to

ActiveSheet.Name = Format(Date, "mm-dd-yy") & "-HD

and it does what I wanted

Thanks for the help

Sherri
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default How to use macro to rename worksheet with date +"text"

Always advisable for using dates in the format yyyy mm for sorting purposes.

--
HTH

-------

Bob Phillips
"Sherri" wrote in message
...
hi Frank,

I tweaked to

ActiveSheet.Name = Format(Date, "mm-dd-yy") & "-HD"

and it does what I wanted!

Thanks for the help!

Sherri



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How to use macro to rename worksheet with date +"text"

Activesheet.Name = Format(Date, "yyyy mm dd") & "-HD"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Sherri" wrote in message
...
What context must I use to rename a worksheet tab with the the current

date?

I have success with naming it in a macro with text using:
ActiveSheet.Select
ActiveSheet.Name = "HD"

I would like tab to be named "Date-HD" but the TODAY() function doesn't

work......

Thanks for your input





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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
How to transfer "text" into "date"? lalann Excel Discussion (Misc queries) 8 July 10th 09 07:56 AM
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error [email protected] Excel Discussion (Misc queries) 4 September 25th 06 01:35 PM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 12:41 PM.

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"