Export (0) Print
Expand All
Expand Minimize

Visual Basic Reference

Visual Studio 6.0

DataText Property

See Also    Example    Applies To

Returns a string from or sets a string for the specified object.


object.DataText [ = string]

The DataText property syntax has these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
String A string expression specifying the string.


To send a string to an object, first set the Format property to a format the object supports. Use the ObjectGetFormats and ObjectAcceptFormats properties to get a list of formats supported by an object.

When getting data from an object, the DataText property returns the string sent from the object, ending at the first null character.

The DataText string can be as large as available memory permits.

Tip   Automation provides an easier and more reliable solution for sending data and commands to and from an object. If an object supports  Automation, you can access the object through the Object property or using the CreateObject and GetObject functions.

© 2014 Microsoft