Link to home
Start Free TrialLog in
Avatar of mehtatej
mehtatej

asked on

WHAT ABOUT THIUS VARIABLE?

I WANT TO ACCESS VALUE OF A VARIABLE SAY V1,
WHILE NAME OF THIS VARIABLE(V1) IS STORED IN VARIABLE
SAY V2. THROUGH V2 HOW CAN I ACCESS VALUE OF V1.
eg.

DIM X AS STRING
DIM N AS INTEGER

X="N"
N=10

HOW CAN I FIND VALUE 10 ACCESSING VARIABLE X?
 
Avatar of mdougan
mdougan
Flag of United States of America image

I don't think you can, but if you explain what you are trying to do, there may be another way.

MD
Avatar of polygon
polygon

no chance
This looks like a long way to do something which may be easily solved. If you could kindly provide some details on what exactly you are trying to do. Thanks.
For your specific example:

    DIM X AS STRING
    DIM N AS INTEGER

    X="N"                 'move this below the other variable setting and then use a conversion
    N=10                  'function (like CInt or CDate or some such)

Is that what you're looking for?

brewdog


Are you tring to define an array, or to find a character or a certain value in a string?
You could try doing it this way:
DIM X As String
DIM N As Integer

N = 10
X = Val(N)

But you would have to intialize the value of N before you can assign it to X.  
I am sure this will work!
Avatar of mehtatej

ASKER

FINDING NOT SATISFACTORY ANSWER.
WHAT THIS INTELLIGENT PEOPLR SO CALLED EXPERT ARE DOING
HERE, WHILE THEY CAN'T UNDERSTAND MY QUESTIONS ALSO.
EVENTHOUGH I MENSION AS POINTER LIKE 'C'.
SORRY..
I AM NOT ACCEPTING IT.
wow wow wow
Maybe you should try using an array with two fields (Name and Value) (Where Name is the name of the variable (N) and Value its Value (10))

Then loop through the array, until you find the entry with the name "N" and get its Value.
Probably because your question are just not clear...

The so called experts are people who TRY to help your FREELY...

btw, give up the caps and learn to type..

People are trying to help you. If you could just type more legibly & express yourself well, you would get a lot more responses.
I would just like to support what other experts have already said.  
I mean we can only try to answer your questions...and if our advice doesn't work, just let us know that it didn't work, instead of being sarcastic.  And please do be more clear and legible next time.  
ASKER CERTIFIED SOLUTION
Avatar of chabaud
chabaud

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial