Iserror & VBA

K

Ken G.

How do you use Excel's "iserror" in VBA? I have a macro that uses a search
result and I want the macro to skip to the end if the search returns "#N/A"
 
C

Chip Pearson

Dim V As Variant
' code that sets V to something
If IsError(V) = True Then
' do something
Else
' do something else
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top