NamedRange::AutoComplete Method (String^)

 

Gets an AutoComplete match from the list.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

String^ AutoComplete(
	String^ String
)

Parameters

String
Type: System::String^

The string to complete.

Return Value

Type: System::String^

An AutoComplete match from the list.

If there is no AutoComplete match or if more than one entry in the list matches the string to complete, this method returns an empty string.

This method works even if the AutoComplete feature is disabled.

The following code example demonstrates how to use the AutoComplete method. The example first sets the value of cell A1 to the string "Martha lives on a vineyard" and creates a NamedRange control in cell A2. The example then uses the AutoComplete method to obtain an AutoComplete match from the substring "Ma" and places the matching value in the NamedRange.

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: