Open Extra Attachmate from excel vba

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Hi all,

Has anyone got a macro to open Extra Attachmate from excel ??

Thanks Al
 
Hi,

Actually am trying to pull data from "Extra mainframe" to excel. before that i want to connect the main frame ( "it Attachmate EXTRA! X-treme 8.0")
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
That code will get you the screen object, which is the object with the most commonly used methods and properties: .getstring, .putstring, .sendkeys, .moveto etc. In fact, I can't think of a time I've used any other part of the object model.

The msgbox() line was a simple example of pulling some text off of the screen. In reality, you'd be be using lines like these (obviously, the screen locations are made up).
Code:
Cells(i,1) = oScreen.getstring (4,16,7)
cells(i,2) = oScreen.getstring (4,25,8)

You'll have to find the correct screen positions of the text you'd want to scrape, how to manuever within the screen, and stable methods of Waiting for mainframe to update it's screen (your PC is much faster than your mainframe data connection).

The macro help in attachmate is ok; take a look at it. Try using Attachmate's macro recorder (the GetObject() statements in the other snippet are pretty much copy/pasted from recorded code).
 
Upvote 0
Hi,

i try the above code but it show some error:

On 4th line:Compile error: user-defined type not defined.

Please help me....
 
Upvote 0
I am trying to Do the same thing.

Same error.

I have added the extra attachmate 1.0 reference in tools.

Any me please 2 lol
 
Upvote 0
Hi Al,

Where do you add the extra attachmate?? because am using Extra attachmate 8.0. not even added this in excel. any suggestion..

Sock R
 
Upvote 0
sorry; I left early bind references in (I always late bind, and was playing around with intellisense). Try either
Code:
Sub ConnectToAttachmateStuff()
    Dim oSys                            As Object
    Dim oSess                           As Object
    Dim oScreen                         As Object
    Set oSys = CreateObject("Extra.System")
    If oSys Is Nothing Then
        MsgBox ("Could not create Extra.System...is E!PC installed on this machine?")
        Exit Sub
    End If
    'GET ACCESS TO THE CURRENTLY ACTIVE SESSION...
    Set oSess = oSys.ActiveSession
    If oSess Is Nothing Then
        MsgBox ("No session available...stopping macro playback.")
        Exit Sub
    End If
    Set oScreen = oSess.screen
    'display the first 40 characters on line 1 after character 19 in a message box
    MsgBox (oScreen.getstring(1, 20, 40))
End Sub
or this.
Code:
Sub ConnectToAttachmateStuff()
    Dim oSys                            As ExtraSystem
    Dim oSess                           As ExtraSession
    Dim oScreen                         As ExtraScreen
    Set oSys = CreateObject("Extra.System")
    If oSys Is Nothing Then
        MsgBox ("Could not create Extra.System...is E!PC installed on this machine?")
        Exit Sub
    End If
    'GET ACCESS TO THE CURRENTLY ACTIVE SESSION...
    Set oSess = oSys.ActiveSession
    If oSess Is Nothing Then
        MsgBox ("No session available...stopping macro playback.")
        Exit Sub
    End If
    Set oScreen = oSess.screen
    'display the first 40 characters on line 1 after character 19 in a message box
    MsgBox (oScreen.getstring(1, 20, 40))
End Sub

The second version is early binding: you'll need to set a reference (tools - references) to Attachmate EXTRA! x.y Object Library, where x.y is the version number that appears.

I apologize about the delay in responses, I had a busy day at work today...
 
Upvote 0

Forum statistics

Threads
1,224,879
Messages
6,181,530
Members
453,054
Latest member
ezzat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top