Doc,

Did you get a chance to look a Glenn's script to check for a minimum version of KiXtart?
KixVer() - Die or Carp if not at specific Kix version
Anyway, tookd your code an simplified is some for you.
code:
debug off
break on
dim $iRC,$opt,$ReqForms,$KixVersion,$frm,$KFCheck,$KiXFound,$KiXMin
for each $opt in split('ascii Explicit NoVarsInStrings WrapAtEOL')
$iRC=setoption($opt,'ON')
next

$ReqForms=41
$KiXMin='4.21'
$KiXFound=@kix
if $KiXFound<$KiXMin
$MBText='This Script requires at least KiXtart version '+$KiXMin+@CRLF
$MBText=$MBText+'The latest version can be downloaded from'+@CRLF+@CRLF
$MBText=$MBText+'http://www.kixtart.org '
$MB=messagebox($MBTEXT,'Version Check',4112)
quit()
endif
$frm=createobject("Kixtart.Form")
If @error=0
if val($frm.Build) < $ReqForms
$MBText='This Script requires Kixforms build '
$MBText=$MBText+$ReqForms+@CRLF+@CRLF
$MBText=$MBText+'The latest version can be downloaded from'+@CRLF+@CRLF
$MBText=$MBText+'http://www.kixforms.com'
$MB=messagebox($MBText,'Version check',4112)
quit()
endif
else
$MBText='Unable to locate KiXforms on this computer. '
$MBText=$MBText+'This Script requires Kixforms build '
$MBText=$MBText+$ReqForms+@CRLF+@CRLF
$MBText=$MBText+'Please download and install the latest version of KiXforms from'+@CRLF
$MBText=$MBText+'http://www.kixforms.com '
$MB=messagebox($MBText,'Version check',4112)
endif

? 'Your KiX32 version is: '+$KiXFound
? 'Okay to run your form now with '+$frm.build
$frm=0 ; you may want to release KiXForms
sleep 2

We maybe able to distill this down a bit further using functions for KIX32, KIXFORMS, and MESSAGEBOX.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's