Hi, all. This is probably really easy.
I've got a macro that calls Excel from Access. It works fine on my PC, but when I try to run it somewhere else, it keeps crashing (probably a setting I need to change).
Whenever I didn't explicitly declare a variable it would tell me that the 'project or object wasn't found'. Well, I fixed this by declaring everything. No big. BUT....
Dim ExcelApp as application <-- fine
Set ExcelApp = CreateObject("Excel.Application") <--fine
With ExcelApp <-- fine
.workbooks.Open "C:\myFile.xls" <-- CRASHES!!!!!!!
end with
I tried to declare workbooks but there is no type for it.
I'm sure it's just a setting somewhere in Access. I just don't know where it is and how to change it. Any suggestions out there?
PS I did not use Option Explicit in my code.
Thank so much everyone.
PB
I've got a macro that calls Excel from Access. It works fine on my PC, but when I try to run it somewhere else, it keeps crashing (probably a setting I need to change).
Whenever I didn't explicitly declare a variable it would tell me that the 'project or object wasn't found'. Well, I fixed this by declaring everything. No big. BUT....
Dim ExcelApp as application <-- fine
Set ExcelApp = CreateObject("Excel.Application") <--fine
With ExcelApp <-- fine
.workbooks.Open "C:\myFile.xls" <-- CRASHES!!!!!!!
end with
I tried to declare workbooks but there is no type for it.
I'm sure it's just a setting somewhere in Access. I just don't know where it is and how to change it. Any suggestions out there?
PS I did not use Option Explicit in my code.
Thank so much everyone.
PB