and I have to agree with MCA on this one.
it surely is easier to follow when the break points are clearly visible.

what comes to loop, I suggest something like:
code:
IF $profile_remove = 'YES'
$index = 0
$keyname = ENUMKEY($profilelocation, $index)
while @error = 0 and $keyname <> @userid
$rc = DELTREE($profilelocation+'\'+$keyname)
$index=$index+1
$keyname = ENUMKEY($profilelocation, $index)
loop
ENDIF

notice, I removed the "sales" check as I have no idea what it was.
you can put it back if it is important.

also kent, if you could be online later, I need to discuss on one outlook manner...
_________________________
!

download KiXnet