LOCAL oSc AS MSScriptControl.ScriptControl TEXT TO lcStr NOSHOW Function ReturnThis() ReturnThis = InputBox("Enter something ...") End Function ENDTEXT oSc = CREATEOBJECT("MSScriptControl.ScriptControl") oSc.Language = "VBScript" oSc.AddCode(lcStr) lcResult = oSc.Run("ReturnThis") ? lcResultBTW, why can't you use VFP Inputbox function?