Accessing Properties

P

Prateek

Hi,

How can I call a Property through a variable?

Suppose I have an object which exposes a Property called "Checkboxes".
I have the word "Checkboxes" stored in a string variable. I want to access the Checkboxes property of the object using this string variable.

Also, I do not want to do a Case or If check here i.e.
If StringVar = "Checkboxes" Then Object.Checkboxes = Something

Can anybody help?

-Prateek
 
H

Herfried K. Wagner [MVP]

* "Prateek said:
Suppose I have an object which exposes a Property called "Checkboxes".

I have the word "Checkboxes" stored in a string variable. I want to access the Checkboxes property of the object using this
string variable.

Have a look at the 'CallByName' function.
 
P

Prateek

Thanks Herfried!

* "Prateek said:
Suppose I have an object which exposes a Property called "Checkboxes".

I have the word "Checkboxes" stored in a string variable. I want to access
the Checkboxes property of the object using this
string variable.

Have a look at the 'CallByName' function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top