G
Guest
Why does the statement give a run time error
If IsError(Application.WorksheetFunction.Match(chk_hdr1, hdr_rng2, 0)) Then
where chk_hdr1 is a variable and hdr_rng2 is a column range name.
It gives the run time error 1004,
Unable to get the match property of the worksheetfunction class.
This happens only when the value of chk_hdr1 is not found in hdr_rng2
If IsError(Application.WorksheetFunction.Match(chk_hdr1, hdr_rng2, 0)) Then
where chk_hdr1 is a variable and hdr_rng2 is a column range name.
It gives the run time error 1004,
Unable to get the match property of the worksheetfunction class.
This happens only when the value of chk_hdr1 is not found in hdr_rng2