On Error problem

dempo

New Member
Joined
Nov 24, 2006
Messages
26
Hi

Your Expertise is required again.
Probably another simple one but i can't find the right bit of code to stop this happening.

I have On Error Goto Not Found command just before i open a file.
this works well when the file is not found.

But it also kicks in if i get an error else where in my code.

How do i isolate the On Error GoTo command for just the Open File command?

Your help is much appreciated.

Dempo
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
After you've opened the file use

Code:
On Error GoTo 0
 

dempo

New Member
Joined
Nov 24, 2006
Messages
26
on error problem

Don't waste your time i think i just found it

On Error GoTo 0

please let me know if this is wrong.

Dempo
 

Watch MrExcel Video

Forum statistics

Threads
1,123,140
Messages
5,599,964
Members
414,352
Latest member
macquarie_jchan58

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top