passing a variable as part of a procedure/function name

  • Thread starter Thread starter Virgil
  • Start date Start date
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
 
You can string the function name together and use the eval() function.

blessings
 
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.
 
Back
Top