We are transitioning from EXTRA Basic to Reflection later this year, and are just beginning the process of testing and validating our existing processes with the new Reflection software. We have a large volume of VBA (Excel) and .NET applications that we use for automation with EXTRA Basic. Typically, these applications connect to EXTRA Basic using the code block below (or something similar).

In VBA, this code (or the VBA equivalent) works fine as-is with Reflection without changing anything. However, it doesn't work in VB.NET - it's unable to create the "EXTRA.System" COM object, which causes the rest of the process to fail. It's strange to me that VBA is able to create the COM object, but .NET isn't.

Is there anything we can do to get this code working as-is in VB.NET? Obviously Reflection has a newer .NET API available, but we would prefer not to have to modify every existing application we have (there's a lot of them!) with the new code.

    Dim _system As Object
    Dim _screen As Object
    Dim _sessions As Object
    Dim _session As Object
    Dim _waitHostSettleTime As Object
    Dim _originalSystemTimeout As Integer

    Public Function Connect(Optional waitHostSettleTime As Integer = 50) As Boolean
            _system = CreateObject("EXTRA.System")
            _sessions = _system.Sessions
            _waitHostSettleTime = waitHostSettleTime ' milliseconds
            _originalSystemTimeout = _system.TimeoutValue
            If (_waitHostSettleTime > _originalSystemTimeout) Then
                _system.TimeoutValue = _waitHostSettleTime
            End If
            _session = _system.ActiveSession
            _screen = _session.Screen
        Catch ex As Exception
            Return False
        End Try

        Return True
    End Function