Opening Excel

DeeDee77

Registered User.
Local time
Today, 20:34
Joined
Jan 24, 2002
Messages
21
I was wondering if there is a way to open a query in Excel without having to save it to a file?
 
DeeDee:
Are you saying the from Excel you want to run a query that is already in an Access Database?
 
No, I want to click a button on a form in Access that opens an Access query in Excel.
 
ah...in that case follow these two steps:

Step 1: Add the following to the OnClick event of your command button:

Add the command button to your form, in the HyperLink address Property click the "..." and browse for the Excel file you want to open, select it and save the form.

Step 2: open the Excel Document and select Tools, macro, Visual Basic Editor. Where you see (General) in the VB Editor click the down arrow and select the Workbook you want to update The following should appear in the VB Editor:

Private Sub Workbook_Open()

End Sub

Add Me.RefreshAll to the code, it will then look like this:

Private Sub Workbook_Open()
Me.RefreashAll
End Sub

Save and close the workbook....

ta-da!
 

Users who are viewing this thread

Back
Top Bottom