Legacy VBA "Wait" method, via global syntax, waits for milliseconds rather than seconds

  • 7023038
  • 31-May-2018
  • 02-Jul-2018

Environment

Reflection Desktop (including Pro, for IBM, or for UNIX and OpenVMS) 16.0 or higher
Reflection 2014
Reflection Pro 2014
Reflection for IBM 2014
Reflection for UNIX and OpenVMS 2014
Reflection for IBM 2011
Reflection for UNIX and OpenVMS 2011
Reflection Standard Suite 2011

Situation

The legacy VBA "Wait" method, called via global syntax in Reflection Desktop, waits for milliseconds rather than seconds.   In Reflection 14.1 for UNIX and OpenVMS or in ProjectLegacy in Reflection Desktop, there are two ways that Reflection VBA methods and properties can be invoked. All members of the "Session" class can be invoked using "global" syntax, because they are all public members of "Session", or the members of the "Session" class can be referenced through the "Session" variable using the "dot" syntax.

In Reflection 14.1 and Reflection Desktop, called from Project Legacy, this waits for one second.
        With Session
                 .Wait(1)   ' notice the period starting this line
        End With

In Reflection 14.1 this code waits for one second.  In Reflection Desktop, called from Project Legacy, this code waits one millisecond.
        With Session
                Wait(1)   ' No period starting this line
        End With

Resolution

If using Reflection Desktop 16.0:
         Upgrade to Reflection Desktop 16.0 SP1 HF17 or higher (16.0.478)
 If using Reflection Desktop 16.1:
         Upgrade to Reflection Desktop 16.1 SP1 or higher

A HotFix (HF) for Reflection Desktop is a cumulatively built product update, intended for limited distribution, which addresses specific customer issues and enhancement requests; outside the regular Development release cycle. It is only available to Micro Focus customers with current software support and maintenance contracts, and only after contacting Micro Focus Customer Support directly.  A HotFix undergoes limited stability and quality testing and is intended for quick release to address specific product issues and should not be deployed to production environments without thorough testing.  It is recommended to upgrade to a full-release or a Service Pack version of Reflection Desktop when it becomes available.

Workaround:

Edit the VBA macros to use the .Wait method (note the leading period or dot) instead of Wait method (notice the lack of leading period or dot).