Fritz Schmude
February 2nd, 1999, 03:35 AM
I have strange errors occurring when I want to run VBA-code
inside Excel when the Excel-file is an application-object in Access.
Access-Code is like:
> Dim objExcel As Excel.Application
> Dim wrkBook As Excel.Workbook
> Dim strDokument As String
> strDokument = "d:\...\test.xls"
> Set objExcel = CreateObject("Excel.Application")
> objExcel.Visible = True
> Set wrkBook = objExcel.Workbooks.Open(strDokument)
In Excel, I have code in workbook-open as follows:
>sub workbook_open
>MsgBox "trying to select table 3..."
>Worksheets("Tabelle3").Select
Now, the message-box appears, but the selection of the table
is not done. Most other commands do not work either, some of them even producing errors.
How can I make my Excel-Code (some thousand lines) run in such a situation?
Any response is strongly welcome, thank you so much.
Fritz Schmude
inside Excel when the Excel-file is an application-object in Access.
Access-Code is like:
> Dim objExcel As Excel.Application
> Dim wrkBook As Excel.Workbook
> Dim strDokument As String
> strDokument = "d:\...\test.xls"
> Set objExcel = CreateObject("Excel.Application")
> objExcel.Visible = True
> Set wrkBook = objExcel.Workbooks.Open(strDokument)
In Excel, I have code in workbook-open as follows:
>sub workbook_open
>MsgBox "trying to select table 3..."
>Worksheets("Tabelle3").Select
Now, the message-box appears, but the selection of the table
is not done. Most other commands do not work either, some of them even producing errors.
How can I make my Excel-Code (some thousand lines) run in such a situation?
Any response is strongly welcome, thank you so much.
Fritz Schmude