A personal repository of random information in compensation for a fatigued biological computer
Breaded IT » MS Access / SQL Server reminders » MSExcel: 13 Type Mismatch
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