I have made a form in Access to input data. I put a button on the form so I could click on it and open excel. But when I click on the excel button I want to open a specific template. A friend has helped me edit the code in Visual Basic and the following what I have:
Dim myExcelApp As Excel.Application
Set myExcelApp = New Excel.Application
myExcelApp.Workbooks.add ("c:\filename.xlt")
Call Shell(stAppName, 1)
Exit_invoice_Click:
Exit Sub
But when I click on the button in Access I get the following error
"Invalid Procedure Call or Argument"
So what do I change to make it work?
------------------
Computers don't have bugs, they just develop random features...


Reply With Quote