BatchErrorMode_Nesnesi.html
BatchErrorMode Nesnesi
BatchErrorMode nesnesi toplu işlemlerde hata yönetimi için kullanılır. Oluşturma:
Dim Batch
Set Batch = Doc.CreateSObject("BatchErrorMode")
Özellikler:
- Version (Integer): Versiyon numarası
- ErrorNumber (Integer): Hata numarası
- ErrorText (String): Hata metni
Örnek Kullanım:
Sub Makro1()
Dim Batch
Set Batch = Doc.CreateSObject("BatchErrorMode")
' Toplu işlemler...
For i = 1 To 10
' İşlemler yapılır
' Hatalar otomatik olarak toplanır
Next
' Hata kontrolü
If Batch.ErrorNumber <> 0 Then
Doc.MsgBox "Hata: " & Batch.ErrorText
End If
Set Batch = Nothing
End Sub
---