The "CALL" statement references the exact path/file where the UDF exists. If it was a script - it would be executed right then, but being a UDF, the CALL statement simply loads the external UDF into memory, allowing it to be invoked by later calls to the function within the main script.

Try the first example - as is, except for changing the name of the computer you want to query. You should get a simple report on the screen that looks like this:
 Code:
Drv      Capacity          Free       <!>
C:      12584644608     8453046272  <Low!>
D:      35993792512    31628820480
E:      14558744576    14364459008


One change to the code I posted earlier - the VAL() should be a CDbl(), and the 500 should be a 500000 - I'm sure you'd want to be warned at 500 MEG and not 500 BYTES!! \:o I forgot that the values were bytes.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D