PC Review


Reply
Thread Tools Rate Thread

Accessing Properties

 
 
Prateek
Guest
Posts: n/a
 
      9th Oct 2003
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
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      9th Oct 2003
* "Prateek" <(E-Mail Removed)> 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>
 
Reply With Quote
 
Prateek
Guest
Posts: n/a
 
      9th Oct 2003
Thanks Herfried!

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:bm32jm$i1je8$(E-Mail Removed)...
* "Prateek" <(E-Mail Removed)> 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>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing Properties? Shak Microsoft Dot NET 4 19th Oct 2006 11:33 PM
Accessing all the properties of IIS =?Utf-8?B?R2F1dGFtS3VtYXI=?= Microsoft C# .NET 1 16th Oct 2005 11:47 AM
Accessing Computer Properties Ravi Windows XP Drivers 1 5th Nov 2004 02:23 AM
Accessing File Properties RWN Microsoft Excel Programming 4 15th Feb 2004 01:39 AM
Accessing S/MIME properties Zahrah Microsoft Outlook 0 21st Aug 2003 03:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:09 PM.