By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,685 Members | 1,326 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,685 IT Pros & Developers. It's quick & easy.

Accessing Properties

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Prateek" <pr**********@msn.com> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
Thanks Herfried!

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Prateek" <pr**********@msn.com> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.