LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Call the property of a class using a variable

I'm sure this is possible.

I have written a class module which contains a number of properties.

I wish to change the value of one of the properties, however I want to
dynamically identify the property that I'm changing

For example: if my class has integer properties of X and Y I wish to be able
to do somthing similar to below

========================================
Function Change_Value(strProperty as String, iValue as Integer)
Dim objClass As myClass

Set objClass = New myClass

objclass(strproperty) = iValue

End Function
=========================================

Thanks in Advance
Rob

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Property value of class instance by passing string property name [email protected] Excel Programming 2 October 19th 07 05:47 PM
Error: Cannot Set Range Class Property 2hOt Excel Programming 2 August 1st 06 12:52 PM
How to cycle through each of property and its value of Class? Tetsuya Oguma Excel Worksheet Functions 1 March 3rd 06 10:36 AM
Cannot set HorizontalAlignment Property of the Range Class Alan Excel Programming 10 December 10th 04 12:57 AM
Access to class property in other workbook BenD[_2_] Excel Programming 2 March 3rd 04 09:11 AM


All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"