hhmmm.
I'm getting error 87 (user not recognised).
if i punch in @userid it returns the correct username.
i don't understand this.

Function quotaUser($drive,$user,$type,$Set)
Dim $quota
If NOT Exist($drive) Exit 3 EndIf
$quota = CreateObject("microsoft.diskquota.1")
If 9<>VarType($quota) Exit 120 EndIf
$quota.initialize($drive,$Set)
$quota=$quota.findUser($user)
If @error Exit 87 EndIf
Select
Case 1=$type $quotauser=$quota.used
Case 2=$type $quotauser=$quota.quotalimit
Case 3=$type $quotauser=$quota.quotalimittext
Case 4=$type $quotauser=$quota.QuotaThreshold
EndSelect
EndFunction

"your quotalimit is " quotaUser("U:\",@USERID,3,0)
If @error "ERROR occured - " @error EndIf
"and you have used " quotaUser("U:\",@USERID,1,0)
If @error "ERROR occured - " @error EndIf

also, as this looks at the drive space, what if the user has saved files elsewhere on the server disk (which will account to the user's disk quota, but will not add to the user's total mapped disk size).