Excel VBA Error 429 on Office 2010, Runs on Office 2016

JLand

Member
Join Date
Apr 2019
Location
Madison, Wisconsin
Posts
114
Folks,

I have an issue with my Excel VBA. When I run the upload script from my machine (Win10 Office 2016) it runs fine. But when I run it from a client's server (WinServer 2012 Office 2010) or the client runs it on his machine (Win10 Office 2010) it returns the following error:

Run-time error '429':

ActiveX component can't create object

I am basically at the end of my ability to figure this out. I have ran SFC, reregistered Excel, and I believe all DLLs are where they should be (I could be wrong here).

Can anyone help?

Here is the code I am debugging (not my code, BTW). Bolded is the line debugger takes me to:
Code:
Dim MyServer As OPCServer
Dim MyGroup As OPCGroup

Dim lNumItems As Long ' defines the number of items to be added, read or writen
Dim arSvrHandles() As Long ' array to contain the server handles, used to write, or remove an item.  this array it redim'ed and returned by the additems procedure
Dim arClHandles() As Long ' array to contain the client handles, used to read and add items.  This array needs to be redim'ed and populated before it can be used
Dim arErrors() As Long ' array to store errors returned by the varrious OPC Automation procedure calls
Dim lTransID As Long ' transaction id for async I/O opporations
Dim lCancelID As Long ' cancel id for async I/O opportations

Const OpcDsCashe As Long = 1 ' used in the OPC read functions, causes the read to take data from the RSlinx Cashe
Const OpcDsDevice As Long = 2 ' used in the OPC read functions, caused the read to take data directly from the device.
Public Function OpcConnect(ByVal MyGroupName As String, ByRef Items() As String) As Boolean
    lNumItems = UBound(Items) - (LBound(Items) - 1) ' determine the number of items to read
    ReDim arClHandles(1 To lNumItems) As Long ' redim then build the client handles array
    For j = 1 To lNumItems
        arClHandles(j) = j
    Next j
       
    Set MyServer = New OPCServer ' create the opc server object
    [B]MyServer.Connect "RSLinx OPC Server" ' connect to the opc server[/B]
    Set MyGroup = MyServer.OPCGroups.Add(MyGroupName) ' create the group object
    MyGroup.IsActive = False ' set the group to inactive then add items
    MyGroup.IsSubscribed = False
    MyGroup.UpdateRate = 500 ' set the group to read data every 500 ms
    MyGroup.OPCItems.AddItems lNumItems, Items, arClHandles, arSvrHandles, arErrors ' add the requested items to the opc server
    MyGroup.IsSubscribed = False ' by setting IsSubscribed = true, you enable asyncrous I/O commands
    
     
    lTransID = 0 ' initilize the transaction id
    lCancelID = 0 ' initilize the cancel id
    
    If MyGroup.OPCItems.Count <> lNumItems Then
        OpcConnect = False
        lNumItems = MyGroup.OPCItems.Count
    Else
        OpcConnect = True
    End If
    
End Function

Thank you so much for taking the time to read this!
 
I assume you have whatever piece of software installed on the client machines that is handling the OPCServer vba bits right? And it is the same 32 or 64bit version as Excel is? because if Excel is 32bit and the dll is 62bit, you're going to have a bad day.
 
I assume you have whatever piece of software installed on the client machines that is handling the OPCServer vba bits right? And it is the same 32 or 64bit version as Excel is? because if Excel is 32bit and the dll is 62bit, you're going to have a bad day.
Other Excel VBA workbooks can upload/download to PLCs via RSLinx Classic on the machine I am trying this just fine.
 
I have an issue with my Excel VBA. ...

Looking at those versions, you may be in DLL Hell and will have to start shaving the yak i.e. installing updates on the older systems. Good luck with that.

An alternative is that the "RSLinx OPC Server" is not running, or cannot be found, or is at a version incompatible with what VBA is expecting; that last is similar to DLL Hell; either way I have no clue what to do about that.

this claims to be a fix but looks sketchy to me.

here and here also, but now you're flailing.

The Google might have some answers; I would hit the StackOverflow links first.
 
Last edited:
Looking at those versions, you may be in DLL Hell and will have to start shaving the yak i.e. installing updates on the older systems. Good luck with that.

An alternative is that the "RSLinx OPC Server" is not running, or cannot be found, or is at a version incompatible with what VBA is expecting; that last is similar to DLL Hell; either way I have no clue what to do about that.
I am sure I am in some sort of hell, but I am not sure I am in DLL hell due to two 2010 machines being broken but one 2016 machine working fine. I reckon it has something to do with that.

Thanks for helping! Seems like I have some rewriting to do. Ugh.
 

Similar Topics

Hi. I have a task of creating checklists for a plant that contain many standard items. My idea is to do this in Excel, whereby in one sheet I...
Replies
11
Views
3,307
Hello, I am looking for help writing to PLC tags from Excel. I am using Factory Talk Gateway as an OPC server and Excel VBA to write out to an...
Replies
5
Views
3,078
Hello. For a PLC data logging application at a candy factory, a customer requested me to setup an add-in for MS Excel called "MX Sheet" which is...
Replies
22
Views
7,959
Good evening, I'll start by explaining what i want to do and then what I've tried. We have an excel document at work that contains our material...
Replies
4
Views
2,277
I have not been able to crack this one out, even after much thinking and googling:banghead:. I would be so grateful if I can get some guidance...
Replies
11
Views
3,674
Back
Top Bottom