ErrorCheckingOptions オブジェクト (Excel)

アプリケーションのエラー チェックのオプションを表します。

注釈

Application オブジェクトの ErrorCheckingOptions プロパティを使用して、ErrorCheckingOptions オブジェクトを取得します。

エラー チェック オプションに関連付けられているインデックス値の一覧を表示するには、Errors オブジェクトの Item プロパティを参照します。

ErrorCheckingOptions オブジェクトが返された後、ErrorCheckingOptions オブジェクトのメンバーである次のプロパティを使用して、エラー チェック オプションを設定または返すことができます。

  • BackgroundChecking
  • EmptyCellReferences
  • EvaluateToError
  • InconsistentFormula
  • IndicatorColorIndex
  • NumberAsText
  • OmittedCells
  • TextDate
  • UnlockedFormulaCells

次の例では 、TextDate プロパティを使用して、2 桁の年のテキスト日付のエラー チェックを有効にし、ユーザーに通知します。

Sub CheckTextDates() 
 
 Dim rngFormula As Range 
 Set rngFormula = Application.Range("A1") 
 
 Range("A1").Formula = "'April 23, 00" 
 Application.ErrorCheckingOptions.TextDate = True 
 
 ' Perform check to see if 2 digit year TextDate check is on. 
 If rngFormula.Errors.Item(xlTextDate).Value = True Then 
 MsgBox "The text date error checking feature is enabled." 
 Else 
 MsgBox "The text date error checking feature is not on." 
 End If 
 
End Sub

プロパティ

関連項目

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。