V
valereh via AccessMonster.com
Good morning,
I am using the following code to open an excel file from an access database
(2003).
Set xlapp = New Excel.Application
xlapp.Visible = False
Address = "X:\QualityAssurance\Documents\QADocs.xls"
Set xlWbk = xlapp.Workbooks.Open(Address) -------------> Debug stops
here
Set xlsht = xlWbk.Worksheets("QA")
xlsht.Select
I use this code on the click event of a form and it works absolutely fine. In
another form, i get "runtime error 1004" message and it does not work. I have
been using this code for 3 years on a many buttons and i don't understand
what is wrong.
Thank you for the help.
Valère
I am using the following code to open an excel file from an access database
(2003).
Set xlapp = New Excel.Application
xlapp.Visible = False
Address = "X:\QualityAssurance\Documents\QADocs.xls"
Set xlWbk = xlapp.Workbooks.Open(Address) -------------> Debug stops
here
Set xlsht = xlWbk.Worksheets("QA")
xlsht.Select
I use this code on the click event of a form and it works absolutely fine. In
another form, i get "runtime error 1004" message and it does not work. I have
been using this code for 3 years on a many buttons and i don't understand
what is wrong.
Thank you for the help.
Valère