P
Pendragon
Access 03/WinXP
I am exporting a series of data into Excel and the workbook is a template
file. After the data is exported, I want the Excel file saved to a
programmed file name. I am getting "Error 438 - Object doesn't support this
property of method." This seems fairly simple, especially after reviewing so
many posts that include some variation of this function. The solution is
probably simple and I've just been staring at this too long. Another set of
eyes is appreciated.
If fIsAppRunning("Excel") = -1 Then
Set objExcel = GetObject(, "Excel.Application")
objExcel.Visible = True
Else
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
End If
With objExcel
.workbooks.Open (stDocName)
End With
.....code....
objExcel.workbooks.SaveAs stDocName
rs.Close
CoDB.Close
objExcel.Close
set rs = nothing
set CoDB = nothing
set objExcel = nothing
I am exporting a series of data into Excel and the workbook is a template
file. After the data is exported, I want the Excel file saved to a
programmed file name. I am getting "Error 438 - Object doesn't support this
property of method." This seems fairly simple, especially after reviewing so
many posts that include some variation of this function. The solution is
probably simple and I've just been staring at this too long. Another set of
eyes is appreciated.
If fIsAppRunning("Excel") = -1 Then
Set objExcel = GetObject(, "Excel.Application")
objExcel.Visible = True
Else
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
End If
With objExcel
.workbooks.Open (stDocName)
End With
.....code....
objExcel.workbooks.SaveAs stDocName
rs.Close
CoDB.Close
objExcel.Close
set rs = nothing
set CoDB = nothing
set objExcel = nothing