Skip to main content

Can anyone help me with a strange problem.

I have a new install of Reflection Desktop 16.1.362.0 32 bit on Windows 10 Pro. 

I have an input box like this:

LogMsg$="Login Required!"
LogTitle$="Please What Region do you want to login to?"
LogDefVal$="Region1"
GetRegion=InputBox(LogMsg$,LogTitle$,LogDefVal$)

Simple easy box, but when I run the macro it displays a new window with the title... that's it and the entire macro freezes to a point that I have to end task on Macro Manager and Macro Editor. 

Any ideas what would cause this?

 


#Reflection

Can anyone help me with a strange problem.

I have a new install of Reflection Desktop 16.1.362.0 32 bit on Windows 10 Pro. 

I have an input box like this:

LogMsg$="Login Required!"
LogTitle$="Please What Region do you want to login to?"
LogDefVal$="Region1"
GetRegion=InputBox(LogMsg$,LogTitle$,LogDefVal$)

Simple easy box, but when I run the macro it displays a new window with the title... that's it and the entire macro freezes to a point that I have to end task on Macro Manager and Macro Editor. 

Any ideas what would cause this?

 


#Reflection

Hi kmichaels27,

When I execute the VBA Macro code:

Sub Test() LogMsg$ = "Login Required!" LogTitle$ = "Please What Region do you want to login to?" LogDefVal$ = "Region1" GetRegion = InputBox(LogMsg$, LogTitle$, LogDefVal$) End Sub

In a Reflection 16.2 3270 session, I see a dialog box pop up with the information expected and when I click OK, the dialog box closes and the 3270 session is in focus and functional.

The code I am using in this test resides in the "ProjectLegacy" object within the rd3x session file running in Reflection workspace.

Is there any other session or macro running when you execute your simple dialog box macro?

Thanks,

Jeff B


Hi kmichaels27,

When I execute the VBA Macro code:

Sub Test() LogMsg$ = "Login Required!" LogTitle$ = "Please What Region do you want to login to?" LogDefVal$ = "Region1" GetRegion = InputBox(LogMsg$, LogTitle$, LogDefVal$) End Sub

In a Reflection 16.2 3270 session, I see a dialog box pop up with the information expected and when I click OK, the dialog box closes and the 3270 session is in focus and functional.

The code I am using in this test resides in the "ProjectLegacy" object within the rd3x session file running in Reflection workspace.

Is there any other session or macro running when you execute your simple dialog box macro?

Thanks,

Jeff B

There are not any other macros running. I am running this from the macro
editor directly.

Some new information though, it doesn't seem to be frozen, it just takes a
very long time sometimes to display. Sometimes it is a second or 2, and
sometimes it can take 5 minutes to pop up. If I end task on Macro Manager
and start over sometimes that helps. It seems pretty random on how long it
takes to display the inputbox.

There are not any other macros running. I am running this from the macro
editor directly.

Some new information though, it doesn't seem to be frozen, it just takes a
very long time sometimes to display. Sometimes it is a second or 2, and
sometimes it can take 5 minutes to pop up. If I end task on Macro Manager
and start over sometimes that helps. It seems pretty random on how long it
takes to display the inputbox.
 

Just so we are on the same page.  Here is what my code screen looks like for this Reflection Desktop Session.  I am calling this from within the session and this code executes as soon as I click the run button.  Are you executing from within a session or is this an external macro?  You can establish basic functionality by creating and executing the code from within a newly created session file.

I also suggest you have a look at the Reflection Desktop VBA guide.

Regards,

Jeff B

Capture27.JPG


 

Just so we are on the same page.  Here is what my code screen looks like for this Reflection Desktop Session.  I am calling this from within the session and this code executes as soon as I click the run button.  Are you executing from within a session or is this an external macro?  You can establish basic functionality by creating and executing the code from within a newly created session file.

I also suggest you have a look at the Reflection Desktop VBA guide.

Regards,

Jeff B

Capture27.JPG

Thanks for the help.  I appreciate the input. 

These macros are written in the old ebedit macro editor and not VBA.   I have about 230 of them.

Although someday I may need to convert them to VBA they have been working for years as they are, up until I replaced my workstation with a Window 10 Pro, so I am not looking to re-write them right now. 

However, when I try it from VBA the input box works. 

It is just strange that is half works in Macro editor.  If I run just that snippet of code, for example, 3 times in a row... 2 times it works then the third I get the attached screenshot

 


Thanks for the help.  I appreciate the input. 

These macros are written in the old ebedit macro editor and not VBA.   I have about 230 of them.

Although someday I may need to convert them to VBA they have been working for years as they are, up until I replaced my workstation with a Window 10 Pro, so I am not looking to re-write them right now. 

However, when I try it from VBA the input box works. 

It is just strange that is half works in Macro editor.  If I run just that snippet of code, for example, 3 times in a row... 2 times it works then the third I get the attached screenshot

 

kmichaels27,

That might just be an issue with the version of EBEDIT that is packaged with Reflection Desktop.  EBEDIT is there so that you do not have to abandon your legacy Extra! Macros but it is not an integrated part of RD.  So it may not have the full support that you need to execute the macro from the editor.  I ask that you try to run the macro from a RD session and see if you get the results that you are looking for:
Capture27.JPG

I ran your code in EBEDIT and was able to reproduce the screen you captured, but executed the same .ebm file many times from the run Legacy EXTRA! Macro dialog from the RD menu and did not have any issue.  Hopefully you will see the same results.  Definitely look into VBA for your future macro needs.

Have a Safe and Happy New Year,

Jeff B


kmichaels27,

That might just be an issue with the version of EBEDIT that is packaged with Reflection Desktop.  EBEDIT is there so that you do not have to abandon your legacy Extra! Macros but it is not an integrated part of RD.  So it may not have the full support that you need to execute the macro from the editor.  I ask that you try to run the macro from a RD session and see if you get the results that you are looking for:
Capture27.JPG

I ran your code in EBEDIT and was able to reproduce the screen you captured, but executed the same .ebm file many times from the run Legacy EXTRA! Macro dialog from the RD menu and did not have any issue.  Hopefully you will see the same results.  Definitely look into VBA for your future macro needs.

Have a Safe and Happy New Year,

Jeff B

Wow that does work from RD directly.  Guess I will have to change up a bit how I run stuff.  Before I just browsed to the folder and opened the ebm file and ran it right from there.

 

Thanks for the help, I don't think I would have ever caught that.