Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this will handle a date and text or numbers: changes 1/13/2004 to 1_13_2004
Sub SaveAs() Dim rngA3 rngA3 = Sheet1.Range("A3").Value If IsDate(rngA3) = True Then rngA3 = Replace(rngA3, "/", "_") End If ChDir "C:\" ActiveWorkbook.SaveAs Filename:="C:\" & rngA3 & " Sales orders.xls", _ FileFormat:=xlNormal _ , Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End Sub "abxy " wrote in message ... What if cell A3 is date? because excel isn't letting me save the file because of cell's date separators(/), I've tried changing the format of the date in the cell, but Excel still interprets the date with / symbols, so i can't save it, becuase windows thinks the /'s are part of a path name --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to automatically save document with cell reference as filena | Excel Discussion (Misc queries) | |||
is it possible to save xls file to a word document like an attachm | Excel Discussion (Misc queries) | |||
'document not saved' for 'save' or 'save as' an EXCEL file | Excel Discussion (Misc queries) | |||
Print Excel to Microsoft Document Image File (MDI) | Excel Discussion (Misc queries) | |||
FILE Save As / FILE Print greyed out in Excel | Excel Programming |