View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
LWD3 LWD3 is offline
external usenet poster
 
Posts: 2
Default Date-Text Format



"Bigfoot17" wrote:

I have a cell (Buttons!B4) that has a date (12/5/08) in it formatted to show
as 5-Dec.

What I would like to do is have this date, or any date in this cell, as a
6-digit text string (120508) so I can use it in the file name when saving the
file. Any suggestions appreciated.


try strDate = Format(Range("Buttons!B4").Value,"mmddyy")

You could then use strDate in your file name: "Prefix" & strDate & ".xls"

This would concatenate a file name of Prefix120508.xls