Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get a runtime error on the activeworkbook.saveas line.
Sub saveIndesign() 'Appends date to filename so as to not write over an existing file ' saveIndesign Macro Const fPath As String = "Mac OS X:Users:jrough:Documents:" Dim fName As String Dim myFileName As String myFileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & Date & ".txt" fName = fPath & myFileName & time() ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=19 MsgBox "File Saved to " & fName End Sub I checked that the diretory is read/write, the filename & path is under 200 characters, the name isn't already created. That is why I would like the time appended to the filename and the date. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Urgent help Runtime error ‘1004’ Method ‘SaveAs’ of object’-Workbook’ failed ????? | Excel Programming | |||
File Name Causes Runtime Error 1004 | Excel Programming | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
SaveAs text file from VBA Getting Error | Excel Programming | |||
runtime error 1004 when opening excel file via VBA in a browser | Excel Programming |