TextFileTrailingMinusNumbers Property

Microsoft Excel Visual Basic

expression.TextFileTrailingMinusNumbers

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

In this example, Microsoft Excel determines the setting for cell A1, treating numbers imported as text that begin with a "-" symbol. This example assumes a QueryTable object exists on the active worksheet.

Sub CheckQueryTableSetting()

    ' Determine setting for TextFileTrailingMinusNumbers
    If Range("A1").QueryTable.TextFileTrailingMinusNumbers = True Then
        MsgBox "Numbers imported as text that begin with a '-' symbol " & _
            "will be treated as a negative symbol."
    Else
        MsgBox "Numbers imported as text that begin with a '-' symbol " & _
            "will not be treated as a negative symbol."
    End If

End Sub