local llError, lcOldError lcOldError = on("error") on error llError = .T. poGpmPager = createobject("Pager.Send") on error &lcOldError if llError MessageBox("Couldn't create object") return -1 && return an error code endif * do your stuff with the object>Thank you for the explanation, Sergey. One more reason to move up to VFP 8. Which I plan to do, anyway.
TRY >> poGpmPager = createobj("Pager.Send") >>CATCH >> =messagebox( "problem" ) >>ENDTRYIn previous version you'll have to use local error handler to do the same.