Open Excel From Access

DPThomas

Registered User.
Local time
Today, 05:43
Joined
Mar 29, 2004
Messages
10
I posted this in Macros and here, please forgive me, I wasn't quite sure which one would be best.

I am looking for a way to open a specific Excel workbook, over a network connection from a button click in Access. The problem being on top of not figuring out how to open the path file is, the Excel workbook imports the data from the access database that the button will reside in, so at some point after the excel workbook opens the database needs to close. I am not even sure if this can be done, but figured I would ask the experts. path to excel file is \\randy\lradata\masters\styles.xls if this helps

Thanks for your time

Dave Thomas
:confused:
 
The easiest way would be the Follow Hyperlink method. Try this in the OnClick event of your button.
Code:
Application.FollowHyperlink "C:\Documents and Settings\Desktop\Template.xls", , True, True
HTH
 
___ said:
The easiest way would be the Follow Hyperlink method. Try this in the OnClick event of your button.
Code:
Application.FollowHyperlink "C:\Documents and Settings\Desktop\Template.xls", , True, True
HTH

Thanks for your help this seems to have worked, although it occasionally crashes the macro due to the database still being open. And if I try to close the current Db, it doesn't close early enough for the macro. Oh Weel, Thanks Again

Dave Thomas
 
Macro ? You should place the code in the OnClick event of a button and to close the db after Excel is opened, try this...
Code:
Application.FollowHyperlink "C:\Documents and Settings\Desktop\Template.xls", , True, True
Docmd.Quit

HTH
 

Users who are viewing this thread

Back
Top Bottom