* Assumes declaration of ShowWindow is in place * Windows are found by oFindWizard, code courtesy of George Tasker, * and placed in an array. SET CONSOLE OFF && Don't want any VFP Windows on Wait command TRY * Otherwise it's visible but not active ShowWindow(aWizards(lnArraySize,1),WIN_NORMAL) oShell.AppActivate(aWizards(lnArraySize,2)) WAIT TIMEOUT 0.005 llResult = oShell.SendKeys("%{END}") && VB <Clear> WAIT TIMEOUT 0.005 llResult = oShell.SendKeys("/for wzttrc." + "{ENTER}") WAIT TIMEOUT 0.005 lcString = '10tr' + lcMvaNo + lcDate llResult = oShell.SendKeys(lcString + "{ENTER}") WAIT TIMEOUT 0.005 CATCH TO oException SET CONSOLE ON =MESSAGEBOX("Sorry, No Mainframe Wizard was found",64,"No open Mainframe Session") ENDTRY SET CONSOLE ON oShell = NULL oFindWizard = NULL>Peter,