Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connector and VBA Scripting Problem

Status
Not open for further replies.

CrystalRain

Programmer
Oct 16, 2003
1
US
I am using an Excel spreadsheet to upload ethnic codes into the ms0760b screen.

I connect, enter the employee id from column 1 row 2 of the spreadsheet into the ms0760a table, execute and continue on to the ms0760b table where the ethnic code is picked up from column 2, row 2 of the spreadsheet. All is well until...

In ms0760a it validates the existing birth date, and pops up a warning screen:

-----------------------------------------
Message Display
Field Name: Birth Date
0667 - WARNING: UNREASONABLE BIRTH DATE
1 of 1 EDIT CLOSE
------------------------------------------

The birth date is fine -- we have a few older workers with birth dates in the 1930's.

My script needs te get past this error, but I cannot find the syntax to select 'CLOSE' so I can continue on from the mso760a screen to the ms0760b screen and put in the ethnic code.

I have tried: gobjMIMSMui.MSO.Commands("Close").Execute
as well as: gobjMIMSMui.MSO.Commands("CANCEL").Execute

How can I "click" on Close using Visual Basic?


Thank you
 
The MSO interface of Connector operates on the buffer of data which (if it was displayed) would be the equivalent of the green-screen/dumb-terminal view. It knows nothing about any pop-up dialogs which are part of the GUI display.

So the question is how to continue on from the warning message 0667 - WARNING: UNREASONABLE BIRTH DATE.
I would guess that this is a "Confirm" step (ie hitting the enter key again), so I guess something like:

Code:
If Trim$(oMimsx.Screen.MSO.Name) = "MSM760A" _
And Mid(Trim$(oMimsx.Screen.MSO.Error),11,7) = "WARNING" _
Then
  oMimsx.Screen.MSO.Commands("OK").Execute
End If

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top