Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Dynamic property names

Hi all

In VBA/Excel is there any way I can dynamically refer to property
names. By this I mean that I want to pass a property name as a
parameter e,g,

sub aSub (aCell as Range, aVal as Variant, prop as ???)

....
aCell.prop = aVal ' or some such

....
end sub

so the input parameter "prop" could be "value" or "formula" or
whatever.

Many thanks

Tone
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Dynamic property names

On 3 Jul, 14:39, Tone wrote:
Hi all

In VBA/Excel is there any way I can dynamically refer to property
names. *By this I mean that I want to pass a property name as a
parameter e,g,

sub aSub (aCell as Range, aVal as Variant, prop as ???)

...
* *aCell.prop = aVal *' or some such

...
end sub

so the input parameter "prop" could be "value" or "formula" or
whatever.

Many thanks

Tone


Answered my own question! - use the function "CallByName"

T
Reply
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
Dynamic Chart Building - "Unable to set the ... property of the Se Jon Peltier Excel Programming 1 December 20th 06 12:13 AM
List of property names and values for a given Object MichaelMalone Excel Programming 4 September 20th 05 03:19 PM
List of property names and values for a given object. MichaelMalone Excel Worksheet Functions 0 September 16th 05 09:49 PM
Get objects property names in run-time? Tom Ogilvy Excel Programming 0 February 13th 04 12:43 PM
Sort names into another worksheet by a property Ron Mello Excel Programming 2 September 30th 03 01:41 PM


All times are GMT +1. The time now is 09:37 AM.

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"