Opening excel template with microsoft access macro

B

Ben Price

I am having a trouble opening a microsoft excel template
with microsoft acess i have put a command button choosing
to run excel and the template but it actually runs the
template not the document created by the template, this
also happens when i try to open a microsoft word
template. Here is the macro:
Private Sub Excel_Click()
On Error GoTo Err_Excel_Click

Dim stAppName As String

stAppName = "Excel.exe
U:\Files\Coursework\Assignment_3\SYSTEM32
\Data_Files\INVOICE.XLT"
Call Shell(stAppName, 1)

Exit_Excel_Click:
Exit Sub

Err_Excel_Click:
MsgBox Err.Description
Resume Exit_Excel_Click

End Sub

Any help would be great.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top