How to reset a UDT variable?

mkjoe
11-18-2002, 02:04 AM
Hi all,

I have a variable with user-defined type.

dim temp as myUDT

After several functions, I would like to reset this variable by using:

temp = null
or
temp = empty

However, they all don't work. So, what can I do? Much thx.

randtek
11-18-2002, 02:24 AM
I usually create a second variable with the same type, with either module or global scope, then set it's values to what I want the default values to be. Let's say we called them udtTest and udtDefault. You can then reset all values in udtTest with this line:


udtTest = udtDefault

mkjoe
11-18-2002, 02:31 AM
Thx, I have tried this method. However, is there any other way? Since i have many UDT type, i may need to create many dummy variables.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum