Hi Gents,
first of all a happy new year to all. Now, here is my question:
I am importing a Excel Table (Excel 2) into Access 97. Unfortunatly Access 97 wants as a minimum Excel3 for direct import (via the transferSpreadSheet).
I generated a piece of code, which should convert the Excel 2 Table into a Workbook by opening Excel (invisible), open the table and then "save as" Workbook.
The code:
------------------------------------------------------------
Dim xlExcel As Object
Set xlExcel = CreateObject("Excel.Application"
xlExcel.Application.DisplayAlerts = False
xlExcel.Workbooks.Open "c:\Testdata\import_test.xls"
xlExcel.ActiveWorkbook.SaveAs fileName:="c:\Testdata\import_test-neu.xls", FileFormat:=xlNormal
xlExcel.ActiveWorkbook.Close
xlExcel.Application.DisplayAlerts = True
Set xlExcel = Nothing
------------------------------------------------------------
Weh i try to compile the code I get error 1004 stating that the variable is not known. Choosing the "TEST" Button on the error Access highlights the "xlNormal" piece of the "save as" code.
Anybody able to suggest?
thanks
Klaus
first of all a happy new year to all. Now, here is my question:
I am importing a Excel Table (Excel 2) into Access 97. Unfortunatly Access 97 wants as a minimum Excel3 for direct import (via the transferSpreadSheet).
I generated a piece of code, which should convert the Excel 2 Table into a Workbook by opening Excel (invisible), open the table and then "save as" Workbook.
The code:
------------------------------------------------------------
Dim xlExcel As Object
Set xlExcel = CreateObject("Excel.Application"
xlExcel.Application.DisplayAlerts = False
xlExcel.Workbooks.Open "c:\Testdata\import_test.xls"
xlExcel.ActiveWorkbook.SaveAs fileName:="c:\Testdata\import_test-neu.xls", FileFormat:=xlNormal
xlExcel.ActiveWorkbook.Close
xlExcel.Application.DisplayAlerts = True
Set xlExcel = Nothing
------------------------------------------------------------
Weh i try to compile the code I get error 1004 stating that the variable is not known. Choosing the "TEST" Button on the error Access highlights the "xlNormal" piece of the "save as" code.
Anybody able to suggest?
thanks
Klaus