VBA-Programmierung in Microsoft Excel

Tutorial: Excel-Beispiele

VBA-Begriff: Add-Methode (PropertyTests-Auflistung)

Fügt der PropertyTests-Auflistung ein PropertyTest-Objekt hinzu.

Syntax

expression.Add(Name, Condition, Value, SecondValue, Connector)

expression   Ein Ausdruck, der ein PropertyTests-Objekt zurückgibt.

Name   String erforderlich. Der Name des Eigenschaftenkriteriums. Dieser Name entspricht einem Wert im Feld Eigenschaft des Dialogfeldes Suchen, das Sie öffnen, indem Sie in einer Anwendung im Menü Datei den Befehl Öffnen wählen und im dann angezeigten Dialogfeld das Menü Extras öffnen.

Condition   Variant erforderlich. Die Bedingung für die Suchkriterien. Dies kann eine der folgenden MsoCondition-Konstanten sein:

msoConditionAnyNumberBetween

msoConditionAnytime

msoConditionAnytimeBetween

msoConditionAtLeast

msoConditionAtMost

msoConditionBeginsWith

msoConditionDoesNotEqual

msoConditionEndsWith

msoConditionEquals

msoConditionFileTypeAllFiles

msoConditionFileTypeBinders

msoConditionFileTypeDatabases

msoConditionFileTypeExcelWorkbooks

msoConditionFileTypeOfficeFiles

msoConditionFileTypePowerPointPresentations

msoConditionFileTypeTemplates

msoConditionFileTypeWordDocuments

msoConditionIncludes

msoConditionIncludesNearEachOther

msoConditionIncludesPhrase

msoConditionInTheLast

msoConditionInTheNext

msoConditionIsExactly

msoConditionIsNo

msoConditionIsNot

msoConditionIsYes

msoConditionLastMonth

msoConditionLastWeek

msoConditionLessThan

msoConditionMoreThan

msoConditionNextMonth

msoConditionNextWeek

msoConditionOn

msoConditionOnorAfter

msoConditionOnorBefore

msoConditionThisMonth

msoConditionThisWeek

msoConditionToday

msoConditionTomorrow

msoConditionYesterday


Value   Variant optional. Der Wert des Suchkriteriums.

SecondValue   Variant optional. Der obere Wert für den Suchbereich. Sie können dieses Argument nur verwenden, wenn Condition den Wert msoConditionAnyTimeBetween oder msoConditionAnyNumberBetween hat.

Connector   Variant optional. Gibt an, auf welche Weise zwei Suchkriterien miteinander verbunden werden. Dies kann eine der folgenden MsoConnector-Konstanten sein: msoConnectorAnd oder msoConnectorOr.