Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excel 2003. I have created a separate workbook from a worksheet
and saved it to my hard drive. I am using the current date as part of the file name so that it changes daily. All this works fine, but I can't close the file after I save it. This is what I have now: Dim strappend As String Dim strpath As String Dim str3 As String Dim str4 As String strappend = Format(Date, "mmddyyyy") strpath = "c:\field tickets\" str3 = ActiveSheet.Range("p1") fsavename = strpath & strappend & str3 & ".xls" If Dir(fsavename) < "" Then fsavename = strpath & strappend & str3 & "a.xls" End If ActiveWorkbook.Sheets("devon asc f").SaveAs fsavename Workbooks("fsavename").Close False This last line is the problem. How do I close this file? All help will be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing a Workbook if Macros aren't enabled. | Excel Programming | |||
Able to preserve value of variable after closing excel? | Excel Programming | |||
Enabling/Disabling Macros w/o closing & re-opening | Excel Programming | |||
Closing Within Macros | Excel Programming | |||
Variable that retains value after closing excel | Excel Programming |