VBA/Excel/Access/Word/Data Type/Type Mismatch — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 19:33, 26 мая 2010
Catch the type mismatch error
<source lang="vb">
Sub ResetValues()
On Error GoTo errorHandler For Each n In ActiveSheet.UsedRange If n.Value <> 0 Then n.Value = 1 End If
TypeMismatch:
Next n
errorHandler:
If Err = 13 Then "Type Mismatch Resume TypeMismatch End If
End Sub
</source>