Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Extra 6.5 freezes/white screen while VBA connection

Extra 6.5 freezes/white screen while VBA connection

Hello everyone

Before the update for Office 2013, my macros in vba connectiong with Extra! Client 6.5 was working better than ever. After this update (or something else that i'm not aware), the same macros doesn't.

Eveything was checked:
- reference in VBA
- object creation and assingments

The command that seems to be facing problems is the .WaitForHost(xxx).

Do you guys face the same problem? If so, is there a way to solve this out?

Thank you and have a good day

RE: Extra 6.5 freezes/white screen while VBA connection


How are you using .WaitForHost?

Plz post your code.


glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Extra 6.5 freezes/white screen while VBA connection

Shure, there you go


Dim System As Object: Set System = CreateObject("EXTRA.System")
    Dim Sessions As Object: Set Sessions = System.Sessions
    Dim Sess0 As Object: Set Sess0 = System.ActiveSession
    Dim Screen As Object: Set Screen = Sess0.Screen

    Dim OldSystemTimeout As Integer: OldSystemTimeout = System.TimeoutValue
    Dim g_HostSettleTime As Integer: g_HostSettleTime = 500
    If (g_HostSettleTime > OldSystemTimeout) Then
        OldSystemTimeout = g_HostSettleTime
    End If
    With Screen
        .MoveTo 1, 30
        .SendKeys ("PDS     ")
        .MoveTo 2, 46
        .SendKeys ("<EraseEOF>")
        .MoveTo 2, 60
        .SendKeys ("<EraseEOF>")
        .MoveTo 2, 65
        .SendKeys ("<EraseEOF>")
        .SendKeys ("<Enter>")
        .WaitHostQuiet (g_HostSettleTime)
     End With 

RE: Extra 6.5 freezes/white screen while VBA connection

You do realize that your Extra terminal emulator is interfacing you asynchronously to your mainframe computer. When you send off a command, your program has to wait for the mainframe to respond before continuing. It could be less than a second or more than a minute. No one knows.

You would never decide before you left your house to drive to work, that you would stop at every intersection, wait for 5 seconds and then blindly proceed through the intersection. No! You wait for feedback from the asynchronous system of reality to determine when it is safe to proceed.

Likewise, you need to wait for a feedback from the mainframe when it is ready. I used .WaitForCursor at the screen rest coordinates in a loop, something like...


Scr.MoveTo r+1,c+1
Do Until(Scr.WaitForCursor(r,c))


glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Extra 6.5 freezes/white screen while VBA connection

Hi SkipVought, thanks for replying

I'm aware of that from an 2015 post here in tek tips. But the issue still remains, even with the doevents waiting for the system to answer.

Excel keep's informing OLE issues.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close