Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open and Refresh an Excel Template from an Access Form

Status
Not open for further replies.

Bonediggler

Technical User
Sep 20, 2007
19
US
Hi There--

I can open the Excel template I want from Access, however, the underlying data query does not run upon opening. The code I am using is as follows:

Private Sub cmdProtocol_Click()

Dim oXL As Object
Dim oExcel As Object
Dim sFullPath As String

sFullPath = "...template.xlt"


Set oXL = CreateObject("Excel.Application")

With oXL
.Visible = True
.Workbooks.Open (sFullPath)


End With


Set oXL = Nothing
Exit Sub

End Sub


Please let me know what the needed code is, and where it fits in this code.

Thank you!
 
Bonediggler,

Your excel template you open, does it query access for data? If that is so, then forum707 is most appropriate. If not you should explain "underlying data query does not run upon opening"
 
Hi JerryKlmns--

Yes, it does query Access for data. I will try looking in the forum you suggested for a solution.


Thanks--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top