newbie: can you pass properties as parameters? (and have Get/Let/Set called?)

B

Bobby

Hello,

Can you pass a property as a parameter to a function? I want to do
something like this:
Private Sub testpropertyparam(toSet As Property)
'toSet = "something"
End Sub

And, its important that the property Let (or Get) is called.

Also, I'm having trouble setting an access field by parameter:
ex:
Private Sub testbyparam(toSet As AccessField)
' do something
End Sub

' some misc. code
Dim tmp As AccessField
Set tmp = Me.MailingAddressRef
testbyparam (tmp) ' ERROR: Object required

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top