View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Saving an excel file using a date

Option Explicit
sub testme()
with activeworkbook
.saveas filename:="C:\somepath\reg_" _
& format(.worksheets("sheetnamehere").range("D2").va lue, "mmddyy") _
& ".xls", fileformat:=xlworkbooknormal
end with
End Sub



Ed Davis wrote:

using VB I would like to save a file using the date that is cel d2.
I want to save it in following format "reg_MMDDYY".xls

Does anyone know how this can be done?
I used to be able to do it in Lotus but have been bashing my mind for the
last couple of years trying this in Excel.

Thank You


--

Dave Peterson