ActiveX Issue in Excel version 2502

Brubaker, Preston 0 Reputation points
2025-02-21T16:00:47.72+00:00

User's image

When using the above ActiveX forms on Excel version 2502, Build 16.0.18526.20044 with the below VBA code, it gives a 429 error (ActiveX component can't create object), but it works without issue on version 2412 Build 16.0.18324.20240.

Private Sub CaseBox_GotFocus()

'Link to Simulation

If Me.Range("SimTypeC") = "HYSYS" Then

    Dim hyAppH As HYSYS.Application

    Set hyAppH = CreateObject("HYSYS.application")

    hyAppH.Visible = True

Else

    Dim hyAppU As UniSimDesign.Application

    Set hyAppU = CreateObject("UniSimDesign.application")

    hyAppU.Visible = True

End If
'Get all the cases in the open application

If Me.Range("SimTypeC") = "HYSYS" Then

    Dim hyCaseH As HYSYS.SimulationCase

    i = 1

    j = hyAppH.SimulationCases.Count

    ReDim caselist(i To j) As String

    For Each hyCaseH In hyAppH.SimulationCases

    caselist(i) = hyCaseH.Title

    i = i + 1

    Next

Else

    Dim hyCaseU As UniSimDesign.SimulationCase

    i = 1

    j = hyAppU.SimulationCases.Count

    ReDim caselist(i To j) As String

    For Each hyCaseU In hyAppU.SimulationCases

    caselist(i) = hyCaseU.Title

    i = i + 1

    Next

End If



With Me.CaseBox

.Clear

.List = caselist
End With

End Sub

Is there a bug with ActiveX in the latest version, or is support removed for ActiveX?

Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,775 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.