Hi Guys,
I am having some strange difficulties with trying to open an excel file.
To briefly outline what I'm trying to do; I have numerous queries which I am using as reports, once the user has set the parameters for the query, I run the query and then export it to excel (using this http://www.databasejournal.com/features/msaccess/article.php/3563671) and then finally open excel (using the Application.FollowHyperlink method).
My problem is that it is very tempremental, sometimes it works fine, sometimes it will open excel but just show the toolbars at the top and bottom of excel, but the middle is like 'crashed' I see like an image of my database which is unusable, even though I can still click all the toolbars... so it's not a complete crash.
Other times I get this error:
And then the following piece of code is highlighted:
I can post more of the code if it will help, but you can always download the excel code from above. Just wondering if anyone has any ideas/suggestions.
Thanks in advance,
Taz
I am having some strange difficulties with trying to open an excel file.
To briefly outline what I'm trying to do; I have numerous queries which I am using as reports, once the user has set the parameters for the query, I run the query and then export it to excel (using this http://www.databasejournal.com/features/msaccess/article.php/3563671) and then finally open excel (using the Application.FollowHyperlink method).
My problem is that it is very tempremental, sometimes it works fine, sometimes it will open excel but just show the toolbars at the top and bottom of excel, but the middle is like 'crashed' I see like an image of my database which is unusable, even though I can still click all the toolbars... so it's not a complete crash.
Other times I get this error:
Run-time error '462':
The Remote server machine does not exist or is unavailabe
And then the following piece of code is highlighted:
Code:
Set appExcel = Excel.Application
I can post more of the code if it will help, but you can always download the excel code from above. Just wondering if anyone has any ideas/suggestions.
Thanks in advance,
Taz