Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.96 KB

Excel.QueryTable.TextFileTrailingMinusNumbers.md

File metadata and controls

57 lines (35 loc) · 1.96 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
QueryTable.TextFileTrailingMinusNumbers property (Excel)
vbaxl10.chm518134
vbaxl10.chm518134
Excel.QueryTable.TextFileTrailingMinusNumbers
4e2257b2-fc88-145b-d307-35b6877d390b
05/03/2019
medium

QueryTable.TextFileTrailingMinusNumbers property (Excel)

True for Microsoft Excel to treat numbers imported as text that begin with a - (minus) symbol as a negative symbol. False for Excel to treat numbers imported as text that begin with a - symbol as text. Read/write Boolean.

Syntax

expression.TextFileTrailingMinusNumbers

expression A variable that represents a QueryTable object.

Remarks

If you import data by using the user interface, data from a web query or a text query is imported as a QueryTable object, while all other external data is imported as a ListObject object.

If you import data by using the object model, data from a web query or a text query must be imported as a QueryTable, while all other external data can be imported as either a ListObject or a QueryTable.

The TextFileTrailingMinusNumbers property applies only to QueryTable objects.

Example

In this example, Microsoft Excel determines the setting for cell A1 for treating numbers imported as text that begin with a - symbol. This example assumes that 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

[!includeSupport and feedback]