Is it possible get open excel file via GetObject in 64-bit?
Hi guys!
I made unsuccessful attempts to get the running Excel-object.
Code:
Set objExcel = GetObject(, "Excel.Application")
In Windows 7-32b this procedure works correctly.
But under Windows 8-64b on this line, an error occurs:
Quote:
"Run-Time Error '429': ActiveX component can't create object"
Also, this code is working:
Code:
Set objExcel = CreateObject("Excel.Application")
But I need to get a running instance.
I'm use Windows 8-64 and Excel 2013.
Re: Is it possible get open excel file via GetObject in 64-bit?
Re: Is it possible get open excel file via GetObject in 64-bit?
Quote:
Set objExcel = GetObject(, "Excel.Application")
works for me in w10 64, xl 2013 32
Re: Is it possible get open excel file via GetObject in 64-bit?
is office/excel 64bit or 32bit?
Re: Is it possible get open excel file via GetObject in 64-bit?
set xlApp = GetObject(, "Excel.Application")
Quote:
If an instance of Microsoft Excel is running when this code is executed, you have access to the running instance's object model through the xlApp variable. If no instance is running, you receive the following trappable run-time error message:
Run-time error '429':
ActiveX component can't create object
https://support.microsoft.com/en-us/kb/288902
Use late binding...
http://windowssecrets.com/forums/sho...l-through-word
However using late binding, one looses intellisense, so best of both worlds - during development use early- and in compiled executable late binding.
http://nuke.vbcorner.net/Articoli/VB...T/Default.aspx