View Single Post
  #2 (permalink)  
Old November 13th, 2006, 07:03 AM
maccas maccas is offline
Friend of Wrox
Join Date: Jun 2003
Location: London, , United Kingdom.
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts

Hi there,

I'm not 100% sure I understand the question but I think you're asking if you can dynamically, at run-time, declare a variable with a name to be determined at run-time. If this is what you're asking after then I'm not aware of any such functionality.

I guess one work-around would be to declare a two part User Type variable which consisted of (to extend your original example) an integer property and a tag string property. This would then lend itself to holding the integer information in the integer part and the dynamic name in the tag placeholder. Of course this is only useful if you really need this sort of functionality as it is a bit clunky. I guess having learnt to write code in VBA I don't see the need for dynamic run-time variable names.

I'd be wary of any claims from VBA to be OO because it isn't. To be fair it does try and is not bad in most places but I wouldn't alway s expect to see generic OO functionality in VBA.


Reply With Quote