I am giving up, will send everything to an XLS VBA. Thanks!
I am having to add a small modification to a VB6 program on a Win7 and Office2010 (v14.0 32bits) environment. Currently the program tries to instantiate by the following line of code:
Dim objExcel as Excel.Application
Set objExcel = New Excel.Application
Right after executing the 2nd line of code, I am showed the error 70: Permission Denied. I have tried a simple test on an Excel VBA, for the same line of code, and works great.
Any clues? is it possible that a service that should be running is down? Anything I should do to avoid reinstalling Office?
Hints I have collected:
Have tried to config permissions on DCOMCNFG but wasn't able to find the Excel Application.
Have tried to run excel.exe /regserver but nothing to seems to happen: Excel runs as usual when it is supposed to run silently.
Ran ProcessMonitor and found that a call to Excel.exe \automation showed Path Not Found (I have checked the path, is ok, I guess the \automation is bothering around).
If I change the code to instantiate a Word Application (and of course dll references), same error appears.
Full permissions given to Office14 folder. Img in follwing link: https://i.sstatic.net/sgZW5.png (Sorry, as new user, can't post images)
Thanks in advance.
Gabriel
I have facing similar problem, I am using in my access DB VBA for opening excel files and therefore I am using command "Set xlApp = CreateObject("Excel.Application")", which suddenly one day starts to throw error 70 Access denied and before it worked fine for couple of months. I start to google it and the moment I learned that it is DCOM error I realized the source of the problems. Because few days ago I was trying to connect my PC with OPC client installed to OPC server and it required to change my local default DCOM setting, I needed to change the default authentification level. So the resolution of my problem was:
run command dcomcnfg in command line
go to Console root > Component Services > Computers > My Computer > DCOM config > Microsof Excel Application
right clic and select properties
In the general tab change the Authentification Level to "None"
and tats it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With