View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Sharpe Sharpe is offline
external usenet poster
 
Posts: 1
Default Day before creation date in cell or as sheet name

Thanks Ron
Helped me heaps in a word template

"Ron de Bruin" wrote:

Try this

Sub test()
Dim str As String
str = Format(ThisWorkbook.BuiltinDocumentProperties _
("Creation Date") - 1, "dd-mm-yy")
ActiveSheet.Name = str
End Sub



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


<Andy wrote in message ...
Hi all
Thanks for reading this!
I'm trying to get the day before the creation date of a file into a cell - or to set it as its sheet name. One small addition is
that I need it as text. So if the creation date is 06/02/06, I need to cell to be 050206 (as text), if the creation date is
01/03/06 then the cell would be 280206. I've got a macro that formats column A as Text and then fills it with the sheet name, but
I'd like to do it all automatically.
Thanks in advance.