Excel COM interface woes

Please post any questions regarding the program here.

Moderator: 2020vision

Excel COM interface woes

Postby weasel » Wed Mar 23, 2011 11:22 am

Hi
I have just tried configuring BA to use the COM interface to Excel and am having problems. I have enabled the COM server on 127.0.0.1 port 8000 and have used the netstat command to verify that the COM server port is available and when I start BA, something starts listening on port 8000.

So far so good

But when I try and use the test_BA_COM.xls script, I get a runtime error 429 'ActiveX component can't create object' which occurs at the following code snippet i.e. when trying to create the COM object


Code: Select all
Private Sub CommandButton1_Click()
    If ba Is Nothing Then
        Set ba = New BettingAssistantCom.ComClass
    End If


I have tried manually adding in the COM reference to the BettingAssistantCom.dll file, but this comes back with an error about the DLL not being a valid microsoft office add-in

I am using MS Office 2010 64-bit on a 64-bit Windows 7 Ultimate machine


My thoughts are that this is either an issue with using 64-bit version of office (and/or Windows) or else perhaps there are some extra security features in office 2010 that prevent me from using the add-in. e.g. the add-in is not digitally signed

Any ideas
Chris
weasel
 
Posts: 9
Joined: Sun Apr 26, 2009 10:56 am

Postby GaryRussell » Wed Mar 23, 2011 11:37 am

It's not an add-in so that's not the problem.

It sounds like it cannot find the dll.

Open up the code editor and select "Compile VBAProject" from the debug menu. Does this display an error message? If it does then select references from the tools menu. It should look something like below. If there is a problem it might have "missing" next to BettingAssistantCom. If this is the case then untick it, close references, open references again, find BettingAssistantCom and tick it.
Image
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby weasel » Wed Mar 23, 2011 12:26 pm

Hi Gary,
Thanks for the rapid response. There are no error messages, and when I select "Tools->References" from the VBA developer window, I see that BettingAssistantCom is checked and refers to the BettingAssistantCom in the BA installation directory so the reference look OK. I must have been having a senior moment because I couldn't originally find the references menu :oops:

I have unchecked & rechecked it and stopped/started Excel, but I still get the error. I'm in the process of building a 32-bit VMware image to test, but if you have any more ideas, I'm all ears

Regards
Chris[/img]
weasel
 
Posts: 9
Joined: Sun Apr 26, 2009 10:56 am

Postby GaryRussell » Wed Mar 23, 2011 12:56 pm

Probably a longshot. Did you try uninstalling and re-installing BA? It will force it to re-register the interface.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby weasel » Wed Mar 23, 2011 1:01 pm

I'll try that if I can't get it working on a 32-bit system
weasel
 
Posts: 9
Joined: Sun Apr 26, 2009 10:56 am

Postby weasel » Wed Mar 23, 2011 1:30 pm

Works fine on a "virgin" 32-bit system, so it might be an issue with either the 64-bit OS and/or the 64-bit version of MS-Office (I suspect the latter).

No too important now I have a working environment, but I'm happy to work with you to bottom this out if you like
weasel
 
Posts: 9
Joined: Sun Apr 26, 2009 10:56 am

Postby osknows » Wed Mar 23, 2011 1:33 pm

I have the same problem on Excel 2010 64bit and Windows 7 64bit. Normally if a reference doesn't work it may need registered. For 64bit Windows there are 2 locations for regsvr32

The 64-bit version is %systemroot%\System32\regsvr32.exe
The 32-bit version is %systemroot%\SysWoW64\regsvr32.exe

eg for me in Start/Run both
C:\Windows\System32\regsvr32 """C:\Program Files (x86)\Betting Assistant\BettingAssistantCom.dll"""
and
C:\Windows\SysWoW64\regsvr32 """C:\Program Files (x86)\Betting Assistant\BettingAssistantCom.dll"""

give me the error

'The module BettingAssistantCom.dll was loaded but the entry-point DllRegisterServer was not found. Make sure that BettingAssistantCom.dll is a valid DLL or OCX file and try again.'
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby GaryRussell » Wed Mar 23, 2011 2:30 pm

We have just tried it on a 64bit system and it doesn't work for us either. As far as we know it has previously so could be something I've done. I will investigate.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby osknows » Thu Apr 28, 2011 9:42 am

Is there any update as to whether the BA COM has been fixed for 64-bit versions in the new beta?

Thanks,
Os
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby GaryRussell » Thu Apr 28, 2011 9:51 am

Sorry, still looking into it.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Mon May 09, 2011 10:39 am

I've just managed to get it working on a 64 bit PC. The following solution worked. Please let me know if it works for you.

1) Open a DOS command window.

2) Navigate to C:\Windows\Microsoft.NET\Framework64\v2.0.50727

3) Enter the following and press enter.
regasm /codebase "c:\program files (x86)\Betting Assistant\BettingAssistantCom.dll"
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby osknows » Tue May 10, 2011 10:24 am

That's great, it worked! Thank you!
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Re: Excel COM interface woes

Postby ians1711 » Fri Dec 05, 2014 9:53 am

Gary
Thanks for the help. Just had to do the regasm fix after having to rebuild my PC after a hard drive crash. Am running Windows 7 and Office 2013. BA version is 1.3.0.14. Any ideas why this doesn't happen automagically when I install for the first time?

Ian S
ians1711
 
Posts: 72
Joined: Fri Jul 11, 2008 9:33 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 43 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.