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
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hello Al,

Are you looking for a macro to open additional attachments to email using Outlook?
 
Upvote 0
Hello Al,

Do you want to run this program from Excel?
 
Upvote 0
Hello Al,

Copy and paste this code into a new VBA Module in your workbook's VBA project. The second macro is an example of how to call the function run that will automatically open or run the file.
Code:
'Written: May 12, 2010
'Author:  Leith Ross
'Summary: Run any registered program or open a web site using the Windows API

 Private Declare Function ShellExecute _
    Lib "Shell32.dll" Alias "ShellExecuteA" _
        (ByVal hWnd As Long, _
         ByVal lpOperation As String, _
         ByVal lpFile As String, _
         ByVal lpParameters As String, _
         ByVal lpDirectory As String, _
         ByVal nShowCmd As Long) _
    As Long


Sub RunTest()

    Dim FilePath As String
    Dim RetVal As Long
  
      ' Change the path to the file you want to open
        FilePath = "C:\Extra Attachmate.exe"
        RetVal = ShellExecute(0&, "open", FilePath, "", "", 1)
    
End Sub
 
Upvote 0
Hello Al,

You're welcome. I take it no problems then adding the code in. That's good news.
 
Upvote 0
hi Leith,

Am trying the above code but it is not working, any ideas, am trying to connect"Attachmate EXTRA! X-treme" using macro... Am new to VBA....

Any ideas

Thanks

Sock R
 
Upvote 0
Are you trying to create some sort of screen scrape macro?

Try:
Code:
Sub ConnectToAttachmateStuff()
    Dim oSys                            As Object
    Dim oSess                           As Object
    Dim oScreen                         As Object
    Dim attSys                          As ExtraSystem
    Dim attSess                         As ExtraSession
    Dim attScreen                       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 = sys.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
 
Upvote 0

Forum statistics

Threads
1,224,879
Messages
6,181,530
Members
453,053
Latest member
DavidKele

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