View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Error trap X 2

Hi OssieMac,

Thanks for your help. The problem was that the error did not want to reset.
I used Err.Clear and thought that would fix it.

I found an example which allowed me to use a Set Statement and Find, which
changed the code completely. Thank you for your time and efforts.

Thanks,
--
David


"OssieMac" wrote:

Hi again David,

If attempting to test the code I posted then change the Find code to following

myDateToFind = DateValue _
(Application.InputBox _
(Prompt:=myPrompt, _
Title:="Date entry.", _
Type:=2))

Initially I had myDateToFind dimensioned as a date and changed it to variant
for the cancel and then vba does not like it.


--
Regards,

OssieMac


"David" wrote:

Hi Group,

I am trapping an error:
On Error GoTo DateChange:

The Error occurs when I am searching for a date which is part of a
"QueryTables".
It works fine when the error only occurs 1 time and in the DateChange:(The
error trapping rountine) I am trying several things:
Err.Clear
On Error GoTo DateChange:

I was hoping this would clear the error and retrap when it occurs again, but
this all fails. Any ideas that allow it to continue to trap the errors would
be appreciated.

Thanks,
--
David