How to call a function with function name reference to a string value in VB

前端 未结 3 1798
眼角桃花
眼角桃花 2020-12-21 18:53

I have this algorithm that I want to implement on VB6.

Sub Main()
dim stringVal1 as string, stringVal2 as string
dim getOne as boolean

stringVal1 = \"FunctO         


        
3条回答
  •  清酒与你
    2020-12-21 19:30

    It would help if you give more information about why you're needing to call functions by the string representation of their name. Could you not simply re-write your code like this:

    If getOne Then 
        Call FuncOne()
    Else 
        Call FuncTwo() 
    End If
    

提交回复
热议问题