Thread: save as issue
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
jatman jatman is offline
external usenet poster
 
Posts: 88
Default save as issue

good morning,

once again i am back because all of the help that i have recieved before
cannot help me out again.

i am using Office 2007, and have a work schedule that works. i want to make
a macro that emails out a copy, and saves a copy in c:/files

the issue revolves around the date. the date displays in the format
yyyy-mm-dd but in the formula bar is shows as dd/mm/yyyy. i want to save the
file with the same format and date that shows in cell B2 (yyyy-mm-dd).

i found the code below:

Dim fname as String
With ActiveWorkbook.worksheets(1)
fname = format(.Range("B2").Value,"yyyymmdd") & ".xlsx"
.SaveAs fname
End With

but when it goes to save the files, it saves the file name as 18991230 but
the date in the cell B2 is April 02, 2008.

if i can get past this issue, i think i can get the rest of the code written
myself. any help on this is appreciated.

thank you,