Hello,
I am using the following code:
'For Each Cell in Range(A1:A10)
Cell.value = ThisValue
On Error GoTo ReadNextCell
Workbook.open....ThisValue
On Error GoTo 0
ReadNextCell:
Next Cell
What is happening is that when ThisValue doesn't exist in the opening destination folder it should GoTo ReadNextCell and resume at Next Cell.
This script works the first time but the next time it happens I get a run time error telling me that the file I am trying to open does not exist.
Why does this only work the first time...it appears it is ignoring the On Error GoTo ReadNextCell statement...Why?
Thanks,
Lino
I am using the following code:
'For Each Cell in Range(A1:A10)
Cell.value = ThisValue
On Error GoTo ReadNextCell
Workbook.open....ThisValue
On Error GoTo 0
ReadNextCell:
Next Cell
What is happening is that when ThisValue doesn't exist in the opening destination folder it should GoTo ReadNextCell and resume at Next Cell.
This script works the first time but the next time it happens I get a run time error telling me that the file I am trying to open does not exist.
Why does this only work the first time...it appears it is ignoring the On Error GoTo ReadNextCell statement...Why?
Thanks,
Lino