Evaluate 语句宏错误

Error in Evaluate statement macro

我有一个 evaluate statement 的问题。我正在尝试将此函数用于 class,因为我想将公式 @DbLookup 用于 lotusscript.

这是我的class代码:

Class DirectorSucursal

    Private m_branch As String

    'Constructor class
    Public Sub New (branch)
        me.m_branch = branch
    End Sub

    'Deleter Class
    Public Sub Delete

    End Sub

    'Function show the field value
    Public sub GetBranch
        MsgBox m_branch
    End Sub

    'Function get the name director
    Public Function getNameDirector

        getNameDirector = Evaluate ({@DbLookup("":"NoCache";"C1256EAD:00478951";"People2"; "D" + m_branch; "FullName"})

    End Function

End Class

我在 getNameDirector = ...

这行有错误

Error in evaluate macro

我做错了什么?

谢谢

您的代码应该是

getNameDirector = Evaluate({@DbLookup("":"NoCache";"C1256EAD:00478951";"People2"; "D} + m_branch + {"; "FullName")})

您必须将变量 m_branch 放在 {...} 字符串之外,并且您错过了 @DbLookup 的结束符“)”。