I created the following script, but am having a few issues with it. I am hoping someone can help me resolve:
If trim(ML_NAME) = "" Then
msgbox "Please fill out Vendor Name before Accepting"
Elseif trim(ML_Add1) = "" Then
msgbox "Please fill out Vendor Address before Accepting"
Else
Set WshShell = CreateObject("WScript.Shell")
sh.AppActivate("* Vendor Maintenance")
WshShell.sendkeys "%h"
set WshShell = nothing
End if
I have created a new "&Accept" button on the Vendor Maintenance screen and renamed the original button as "Finis&h".
I am running MAS200 v3.71.
If I run the following three lines from the script, it works without errors (this section basically activates the original button that I have renamed):
Set WshShell = CreateObject("WScript.Shell")
WshShell.sendkeys "%h"
set WshShell = nothing
When I add the "IF" statement(s) in the script, it will not recognize text entered in the vendor name field.
I am also having issues with the line " sh.AppActivate("* Vendor Maintenance")". The script errors out if I include this line in the script.
Any help would be greatly appreciated!
If trim(ML_NAME) = "" Then
msgbox "Please fill out Vendor Name before Accepting"
Elseif trim(ML_Add1) = "" Then
msgbox "Please fill out Vendor Address before Accepting"
Else
Set WshShell = CreateObject("WScript.Shell")
sh.AppActivate("* Vendor Maintenance")
WshShell.sendkeys "%h"
set WshShell = nothing
End if
I have created a new "&Accept" button on the Vendor Maintenance screen and renamed the original button as "Finis&h".
I am running MAS200 v3.71.
If I run the following three lines from the script, it works without errors (this section basically activates the original button that I have renamed):
Set WshShell = CreateObject("WScript.Shell")
WshShell.sendkeys "%h"
set WshShell = nothing
When I add the "IF" statement(s) in the script, it will not recognize text entered in the vendor name field.
I am also having issues with the line " sh.AppActivate("* Vendor Maintenance")". The script errors out if I include this line in the script.
Any help would be greatly appreciated!