Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro converting from running TSYS scrape to Attachmate TSYS scrape

Status
Not open for further replies.

downingolsen

Technical User
Jan 23, 2014
2
US
I apologize if this has been covered before...I had an Excel Macro that used to pull a scrape of data from a program called TSYS and then place the information in an excel spreadsheet, worked great but now due to system upgrades I have to access TSYS through Attachmate Reflection Suite for X 2011....I guess I am requesting guidence on how to change the coding to find this program rather than TSYS and then run the macro like before.

Thanks in advance for any assistance
 
Hi Skip, thanks for the reply and I apologize for not being really clear plus I am a bit new to this. This would be the code that is in the Excel VB. So the first part I guess is the code for the Button that is selected to ger the whole process running and it looks like this.

Code:
Private Sub PullStat()
Dim S1 As Sheet1
Dim i As Integer
Dim Acct As String

Dim Sess As String


Sess = TSYS_Session_Active()

Sess = "A"

If Sess = "NONE" Then
    MsgBox "No Active TSYS Session Found"
    Exit Sub

Then the VB for Module 1 starts like this

Code:
Public Function TSYS_Session_Active() As String
Dim autECLWinObj As Object
Dim ConnList As Object
Dim WinTitle As String
Dim i As Long

On Error GoTo PCOMM_ERROR

Set ConnList = CreateObject("PCOMM.autECLConnList")
 
' Initialize the connection
ConnList.Refresh

If ConnList.Count = 0 Then
    TSYS_Session_Active = "NONE"
    Exit Function
End If

For i = 1 To ConnList.Count
Set autECLWinObj = Nothing
Set autECLWinObj = CreateObject("PCOMM.autECLWinMetrics")
autECLWinObj.SetConnectionByHandle (ConnList(i).Handle)
WinTitle = autECLWinObj.WindowTitle 'get the window title
    While Len(WinTitle) > 3
        If Left(WinTitle, 4) = "TSYS" Then
            TSYS_Session_Active = ConnList(i).Name
            Exit Function
        Else
            WinTitle = Mid(WinTitle, 2)
        End If
    Wend

Next i

PCOMM_ERROR:
TSYS_Session_Active = "NONE"
End Function

Now because the TSYS session is run/accessed through attachmate, this macro will not work, so is this as easy as changing all the references to TSYS to something else or is it more complex than that.

Thanks

Pieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top