Error Handling - EditGo ToSpecial
You are best off to handle this with a range object something like this
dim rng as range
on error resume next
set rng = Selection.RowDifferences(Activecell)
on error goto 0
if not rng is nothing then rng.select
--
HTH...
Jim Thomlinson
"Felix Dalldorf" wrote:
I am having trouble trapping certain kinds of errors in Visual Basic macros.
Specifically I can't seem to trap errors related to the "EditGo ToSpecial"
variety.
For example, if two columns are selected, and I try to locate rowdifferences
between the columns using:
Selection.RowDifferences(Activecell).Select
will work fine if there are row diffrences. If there are no differences, I
get error 1004, which I can't trap using "On Error" handling.
I have the same problem if the Macro tries to look for Blank cells.
Does anyone have a solution for how to trap and handle these errors?
|