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

前端 未结 3 1792
眼角桃花
眼角桃花 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:44

    Generally, such code patterns point to errors in your software design.

    In the rare cases where this is really needed, CallByName accomplishes this.

    Example:

    Call CallByName(Me, "NameOfFunction", vbMethod, arguments)
    

提交回复
热议问题