use string value as field property?

User avatar
pmatz
StarLounger
Posts: 71
Joined: 20 Feb 2010, 10:31
Location: UK

use string value as field property?

Post by pmatz »

Hi,

I have a vba function which looks up entries via ldap.
in breif i have it set up:

Code: Select all

Set rs = conn.Execute(ldapStr)
Set FoundObject = GetObject(rs.Fields(0))
and then was populating an array with:

Code: Select all

aResult(0) = FoundObject.sn
aResult(1) = FoundObject.co
aResult(2) = FoundObject.title
etc

i thought i would be clever and use checkboxes with names chk_sn, chk_co, chk_title etc and then use a loop to grab the properties of the found object depending on which checkboxes were ticked.

thing is i realise now i am tryin gto append a string value to the found object 's property. eg:

Code: Select all

aResult(i) = FoundObject.<<string>>
where <<string>> is an array (chk(i)) got by grabbing the parsing the checkbox names in a loop

i dont think there is a way to do this is there? Does this make sense?
thanks, Paul.

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: use string value as field property?

Post by HansV »

I have no experience with this, but does something like this work?

aResult(i) = FoundObject(chk(i))
Best wishes,
Hans