
Variable type of variable?
Quote:
> I don't want to use a Variant type because I don't have control over the
> conversion (from variant to integer/long/single/etc.)
You can convert the variant or a string to the selected type.... Anyway for
either Variant or String; see the VB conversion functions. Brad
Quote:
>I am developping an ActiveX control (in VB5) that is like a TextBox control
>that can only hold numbers. What I want my control to do is to let me
>forget about masking and validatting the numbers an user can enter in my
>control.
>The idea is that I will have a Number property that will let an get the
>value of the number shown in the control. The problem is that with another
>property I set the kind of number it if expected to be entered by the user
>(integer, long integer, single precision, double precision, etc.). My
number
>property should return (and expect) the type of data specified by the other
>property. The question is: How can I declare a property without specifing
>its type (the AS clause)?
>I don't want to use a Variant type because I don't have control over the
>conversion (from variant to integer/long/single/etc.) And I know for
>experience that conversion which depends on international configurations
>brings me problems...
>I heard that if I were programming in C what I could use is a Class
>Template... but I want to do it with VB5!!
>Any ideas?
>Thanks!!
>========================================
>Pedro J. Rusjan
>WEB: http://www.mug.org.ar/socios/pedro.rusjan
>========================================