バージョン

Add(CustomDataValidationRule,WorksheetCell) メソッド

CustomDataValidationRuleWorksheetCell に適用します。
シンタックス
'宣言
 
Public Overloads Sub Add( _
   ByVal rule As CustomDataValidationRule, _
   ByVal cell As WorksheetCell _
) 
public void Add( 
   CustomDataValidationRule rule,
   WorksheetCell cell
)

パラメータ

rule
セルに適用するデータの入力規則ルール。
cell
このデータの入力規則ルールを適用するセル。
例外
例外解説
System.ArgumentNullExceptionrule が null の場合に発生します。
System.ArgumentNullExceptioncell が null の場合に発生します。
System.ArgumentExceptioncell が、このコレクション以外のワークシートにある場合に発生します。
System.ArgumentExceptionrule がすでに別のワークシートに適用されている場合に発生します。
System.ArgumentExceptionルール タイプの要件に元づいて rule が無効な場合に発生します。
System.ArgumentExceptioncell にすでにデータの入力規則ルールが適用されている場合に発生します。
System.ArgumentExceptioncell がテーブルの集計セルである場合に発生します。
参照