[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to Specify Dynamic Function Name

Posted on 2009-02-12
1
Medium Priority
?
1,007 Views
Last Modified: 2012-05-06
How do you dynamically specify a function name at runtime? Please see the sample code below, where the elements in array arrFunc() are set to either True or False. I want the loop to dynamically call functions fncProcess1, fncProcess2, or fncProcess3, depending on the boolean value of the current array element.
Dim intElement As Integer
        Dim strResults as String
 
        For intElement = 1 To 3
            If arrFunc(intElement) Then
                strResults = Eval("fncProcess" & intElement)
            End If
        Next
    End Sub

Open in new window

0
Comment
Question by:brian_appliedcpu
1 Comment
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 23624998
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question