User defined data type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

Is it possible to create a user-defined data type of the following example

11.1 (ie, the data type must be within 99.9 to 00.0

I know I could use a For...Next to validate a input (say A1), or If Statement, but wouldn't be far more efficient if I could use VarType function

Also could someone tell me, why is it that when I test the following code in Immediate Window in VBE
a=11.
b=TypeName(a
print

I get b as Double, why is it that it ain't in Single?
 
A data type does not support limiting the values it can hold beyond storage
restrictions on the size of a value it can store. UDT's are made up of
standard data types.

As to the immediate window, what real diffence does it make. The immediate
window is for debugging. You can use implicit declarations if you need a
specific type.

--
Regards,
Tom Ogilvy

augustus108 said:
hi,

Is it possible to create a user-defined data type of the following example:

11.1 (ie, the data type must be within 99.9 to 00.0)

I know I could use a For...Next to validate a input (say A1), or If
Statement, but wouldn't be far more efficient if I could use VarType
function?
 
Back
Top