The code posted works fine for me.
Which value is giving the error? It's starting to look as if either your VB installation is duff, or that something unrelated is causing the problem.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'