Microsoft Office Tutorials and References
In Depth Information
Table 26-2. Arguments of the ListObjects Collection’s Add Method (continued)
Argument
Required or Optional
Description
Source
Optional if SourceType is set
to xlSrcRange ; required if
SourceType is set to
xlSrcExternal
When SourceType is set to xlSrcRange , this
argument refers to the range used to create
the ListObject . When SourceType is set to
xlSrcExternal , this argument must contain
an array of three strings (a URL to a page on
a SharePoint site, a list name, and a value
representing the view to be applied to the
list). There’s no list of these values in the
Visual Basic Editor Help system, so you
should leave the third element of the array
blank unless you are, or can get the correct
values from, a SharePoint administrator.
LinkSource
Optional
A Boolean value that indicates whether to
link the list to an external data source. The
default value is True if the SourceType
argument is set to xlSrcExternal . Setting the
argument to either True or False when the
SourceType argument is set to xlSrcRange
creates an error.
HasHeaders
Optional
A variant value that indicates whether the
ListObject has an existing set of column
labels. The argument can be set to xlGuess ,
xlNo , or xlYes . If the source data doesn’t
contain column labels, or if Excel can’t
detect them, the method will create
headers.
Destination
Required if the SourceType
A Range object that identifies the cell at the
argument is set to
top left corner of the new list object. The
xlSrcExternal ; ignored if
destination must be on the worksheet that
the SourceType argument
called the Add method.
is set to xlSrcRange
namestring
Required
A string that contains a unique name for
the list.
Note The Add method inserts new columns to the right of the cell identified in the
Destination argument to ensure that there’s room for the new list; existing data won’t be
overwritten.
Search JabSto ::




Custom Search