I have a excel file two years old that was working ok , so I stored it for further use
In ba I open 3 tabs and link them to 3 workbooks
In all excel files I have in the code:
- Code: Select all
Dim WithEvents ba As BettingAssistantCom.ComClass
......
If ba Is Nothing Then
Set ba = New BettingAssistantCom.ComClass
ba.tabIndex = 2
End If
(the tabindex changes accordingly)
The first two files are working ok for some time now ( com and everything else)(files that are different to the old one)
I link the third file ( the old two years file) today and I get the error:
object or class does not support the set of events"
and the line:
Set ba = New BettingAssistantCom.ComClass
is highlighted
The vba reference to ba com is enabled
Any ideas whats wrong?
I don't get it since for me it looks like that the relative/required code is same in the three workbooks
(or I'm missing something)