Link to home
Start Free TrialLog in
Avatar of kiranboi
kiranboi

asked on

Protected Memory Error When Using Automation to Control Excel

Hi all,

I have written a little utility that prints out information in a certain format by using automation to insert the data into an Excel template and then print to the default printer from Excel.

This has all been working fine. I have now upgraded the utility slightly and now, even though I havn't changed the automation part, whenever my app tries to open an Excel file I get an error saying: I have attmepted to read or write protected memory. This then stops my app from working.

Does anyone know why this is happening and what I can do to fix it?

Many Thanks.
ASKER CERTIFIED SOLUTION
Avatar of bsharath
bsharath
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kiranboi
kiranboi

ASKER

Thanks for the advice but it turns out it was looking for Microsoft Excel 11.0 Object Library and couldnt find it on the target machine.
I found a previous question on EE telling me to change from early binding to late binding and it works great now.
Thanks
Ok great...
Please close the Q if this helped...