passing a variable as part of a procedure/function name

V

Virgil

I haven't seen this subject mentioned before. I have ~50
functions that have the same name except for the last two
characters. As part of a procedure/function call, is it
possible to pass the last two characters as a variable to
complete the function name:

strVariable = "US"
Call AddressLetter + strVariable

Public Function AddressLetterUS()
blah, blah ...
End Function
 
L

Lance McGonigal

You can string the function name together and use the eval() function.

blessings
 
D

Dan Artuso

Hi,
It would be much better to have one function that accepts a parameter
that tells it what 'section' of code to run.
Just use a Select Case statement.
 

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