Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[AHK_L]ComObjActive() HELP


  • Please log in to reply
4 replies to this topic
bolang
  • Members
  • 12 posts
  • Last active: Jan 19 2012 05:16 PM
  • Joined: 17 May 2007
[Moderator's note: Moved topic from Bug Reports to Ask for Help.]

ComObjActive() stability

If it is XLS file to open by clicking on the excel: no problem
but If it's open excel.exe to be wrong
Be ComObjActive bugs! I am win7 excel 2010
bolang

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
Please state your problem more clearly.

bolang
  • Members
  • 12 posts
  • Last active: Jan 19 2012 05:16 PM
  • Joined: 17 May 2007
I want to use
objExcel := ComObjActive("Excel.Application")
Connection already open the excel

Sometimes success, sometimes fail

Hence, I through test to find out
If XLS files and open by double-clicking excel, connection succeeds
But, if by double-clicking excel.exe open excel 2010, then connection failure

Error: 0x800401E3 - Operation cannot use
bolang

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
This is not an AHK problem, it is related to the problem described by Microsoft here.

Somebody asked about this exact problem a day or two ago and the problem was that when their script was run it attempted to get an Excel instance right away, but they didn't always have a running instance of Excel when they started their script. You may want to post your script so we can see what may be causing it, but it is not an error on the part of AHK.

bolang
  • Members
  • 12 posts
  • Last active: Jan 19 2012 05:16 PM
  • Joined: 17 May 2007
thx
bolang