I want to make a function that can take as input a Byte, Integer, or Long. Then I want to use VarType to determine the type of data passed to it, and from there how it should behave in response. I don't want to pass it a type of Variant as then it will simply be of type Variant instead of Byte, Integer, or Long. I want to be able to pass to my function a variable DIMed as either Byte, Integer, or Long; and then have my function determine what to do based on the type of variable that was passed to it, and behave accordingly.
Therefore I need to pass my variable As Any to the function. Unfortunately I hear that only works in calls to the API or DLLs, and not to internal VB structures like Functions. Please help me achieve As Any functionality in VB6. Is there a "hack" or "trick" to make this work?
Therefore I need to pass my variable As Any to the function. Unfortunately I hear that only works in calls to the API or DLLs, and not to internal VB structures like Functions. Please help me achieve As Any functionality in VB6. Is there a "hack" or "trick" to make this work?