GefTextFormat.CanEditWithExpression (method)

Gets a Boolean indicating whether it is a valid expression for use with an edit action.
Syntax: Boolean = object.CanEditWithExpression ( Expression )
Parameters:
Optional Expression As String -
Description: If the Expression parameter is omitted, the Expression property of the GefTextFormat is tested instead to see if it is a valid expression. If the Expression parameter is included then it checks if that expression is valid.

Example:

Sub GefTextFormat_CanEditWithExpression()
    
    Dim oCimObj As GefObject
    Dim oCimTxtFmt As GefTextFormat
    
    Set oCimObj = CimGetObject
    Set oCimTxtFmt = oCimObj.TextFormat
    If Not oCimTxtFmt Is Nothing Then
        oCimTxtFmt.TextExpression = "$Project.DateTime"
        CimGetScreen.Refresh False
        If oCimTxtFmt.CanEditWithExpression("$Project.DateTime") = True Then
            CimGetScreen.Refresh False
            MsgBox "The expression is valid"
        End If
    Else
        MsgBox "The object does not have any text to format"
    End If
    
End Sub