'Macro won't run in my latest system(capturing data)

I have 2 macro version code that runs in old version of PCOMM System(capturing data). However After the update of latest PCOMM System(Capturing data). My macro will run as "Macro run complete" but the data didn't reflect in excel.

Here's my Version 1 My code can't capture data in my new latest PCOMM system(capturing data site) However macro says "Macro Run Complete!" to get the data. Show images and sample code below

when i click "Run macro" it says :Macro run complete", however the data didn't reflect

Public Function Extra_Init() As Boolean On Error 
GoTo ExitExtraInit
Extra_Init = False

Set goExtraSys = CreateObject("PCOMM.autECLConnList")
goExtraSys.Refresh

Set goSessions = CreateObject("PCOMM.autECLOIA")
goSessions.SetConnectionByHandle (goExtraSys(1).Handle)

giSessionCount = goExtraSys.Count

If giSessionCount = 1 Then

    Set goSession = CreateObject("PCOMM.autECLPS")
    goSession.SetConnectionByHandle (goExtraSys(1).Handle)
    
    If goSession.CommStarted Then
        Extra_Init = True
    Else
        Extra_Init = False
    End If
    
End If

Exit Function

Here's my Version 2 My Microsoft Visual Basic when being run, an error prompts showing "class not registered"

Sample images below.

When I run macro the error says "class not registered"

When I click debug the macro code says in this highlighted yellow line

Error appears in this part of code.

Set Exl = GetObject(, "Excel.Application") Set Extra = CreateObject("PCOMM.autECLConnList") Extra.Refresh

Thank you in advance!

Get the data in my latest version of PCOMM System



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source