M
Melissa
Does anybody know why Access gives me the error message that it cannot find
the file I'm specifiying in the xl.workbooks.open function? If I just
created it, why can't it find it? And I have looked and it is there with the
filename I sprecified.
Dim strFilename As String
'Export TSC Open Order Reports
strFilename = "" & Format(Date, "mm-dd-yyyy") & ""
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryOpenOrdersNonStorage", _
"G:\Sync\Public\DBArchives\TSCOpenOrderReports\" & strFilename
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryOpenOrdersStorage", _
"G:\Sync\Public\DBArchives\TSCOpenOrderReports\" & strFilename
'Open Open Order Reports and Format
Dim xl As Object 'Excel application
Dim wr As Object 'Excel workbook
Dim sh As Object 'Excel worksheet
Set xl = CreateObject("Excel.Application")
Set wr = xl.Workbooks.Open("G:\Sync\Public\DBArchives\TSCOpenOrderReports\"
& strFilename)
I thoroughly appreciate all the help everyone has provided me on here over
the past several months. Hopefully someday I'll know enough to give back
the file I'm specifiying in the xl.workbooks.open function? If I just
created it, why can't it find it? And I have looked and it is there with the
filename I sprecified.
Dim strFilename As String
'Export TSC Open Order Reports
strFilename = "" & Format(Date, "mm-dd-yyyy") & ""
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryOpenOrdersNonStorage", _
"G:\Sync\Public\DBArchives\TSCOpenOrderReports\" & strFilename
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryOpenOrdersStorage", _
"G:\Sync\Public\DBArchives\TSCOpenOrderReports\" & strFilename
'Open Open Order Reports and Format
Dim xl As Object 'Excel application
Dim wr As Object 'Excel workbook
Dim sh As Object 'Excel worksheet
Set xl = CreateObject("Excel.Application")
Set wr = xl.Workbooks.Open("G:\Sync\Public\DBArchives\TSCOpenOrderReports\"
& strFilename)
I thoroughly appreciate all the help everyone has provided me on here over
the past several months. Hopefully someday I'll know enough to give back