Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable "File Not Found" dialog box
Hello!
I am working on code that opens a workbook, does stuff with it, and then closes it. It is linked to two other workbooks that cannot be in the same folder, therefore, I keep getting the "File Not Found" dialog box which I have to click close on each time I run the code. How can I get rid of this annoying thing? I looked through Help and couldn't find the designation fot this particular dialog box (even more annoying!). Any help will be greatly appreciated! Sandy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable "File Not Found" dialog box
Sandy,
Before the offending line of code.... On Error Resume Next After the offending line of code... On Error GoTo 0 This turns off error and turn on error handling. Best regards, Kevin H. Stecyk "Sandy" wrote in message ... Hello! I am working on code that opens a workbook, does stuff with it, and then closes it. It is linked to two other workbooks that cannot be in the same folder, therefore, I keep getting the "File Not Found" dialog box which I have to click close on each time I run the code. How can I get rid of this annoying thing? I looked through Help and couldn't find the designation fot this particular dialog box (even more annoying!). Any help will be greatly appreciated! Sandy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable "File Not Found" dialog box
Hi Kevin!
Thanks for your response. What does "On Error GoTo 0" do? Where is the "0" that is referred to? Also, my code is in Access. Should I put this language in Access, along with my other code? Sandy -----Original Message----- Sandy, Before the offending line of code.... On Error Resume Next After the offending line of code... On Error GoTo 0 This turns off error and turn on error handling. Best regards, Kevin H. Stecyk "Sandy" wrote in message ... Hello! I am working on code that opens a workbook, does stuff with it, and then closes it. It is linked to two other workbooks that cannot be in the same folder, therefore, I keep getting the "File Not Found" dialog box which I have to click close on each time I run the code. How can I get rid of this annoying thing? I looked through Help and couldn't find the designation fot this particular dialog box (even more annoying!). Any help will be greatly appreciated! Sandy . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable "File Not Found" dialog box
Hi Sandy,
On Error GoTo 0 merely returns the error handling. To be honest, I never really understood the "0" either, other than it works and is what is stated in the on-line help. Have a look there. With regard should you enter the code in Access, I don't know. Have a look at your Access help and check for error handling. I suspect that it is the same, but if not, it should be similar. All you want to do is cancel and reinitiate the error handling. Hope that helps! Best regards, Kevin H. Stecyk "Sandy" wrote in message ... Hi Kevin! Thanks for your response. What does "On Error GoTo 0" do? Where is the "0" that is referred to? Also, my code is in Access. Should I put this language in Access, along with my other code? Sandy -----Original Message----- Sandy, Before the offending line of code.... On Error Resume Next After the offending line of code... On Error GoTo 0 This turns off error and turn on error handling. Best regards, Kevin H. Stecyk "Sandy" wrote in message ... Hello! I am working on code that opens a workbook, does stuff with it, and then closes it. It is linked to two other workbooks that cannot be in the same folder, therefore, I keep getting the "File Not Found" dialog box which I have to click close on each time I run the code. How can I get rid of this annoying thing? I looked through Help and couldn't find the designation fot this particular dialog box (even more annoying!). Any help will be greatly appreciated! Sandy . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable "File Not Found" dialog box
In this context, it's just a convention used to turn off error trapping. In effect, it means
"don't go anywhere". The roots are in early DOS BASIC where lines were always numbered, and you were advised NOT to use the number 0, because of its special significance in cases like this. On Wed, 3 Sep 2003 19:59:55 -0600, "Kevin Stecyk" wrote: Hi Sandy, On Error GoTo 0 merely returns the error handling. To be honest, I never really understood the "0" either, other than it works and is what is stated in the on-line help. Have a look there. With regard should you enter the code in Access, I don't know. Have a look at your Access help and check for error handling. I suspect that it is the same, but if not, it should be similar. All you want to do is cancel and reinitiate the error handling. Hope that helps! Best regards, Kevin H. Stecyk "Sandy" wrote in message ... Hi Kevin! Thanks for your response. What does "On Error GoTo 0" do? Where is the "0" that is referred to? Also, my code is in Access. Should I put this language in Access, along with my other code? Sandy -----Original Message----- Sandy, Before the offending line of code.... On Error Resume Next After the offending line of code... On Error GoTo 0 This turns off error and turn on error handling. Best regards, Kevin H. Stecyk "Sandy" wrote in message ... Hello! I am working on code that opens a workbook, does stuff with it, and then closes it. It is linked to two other workbooks that cannot be in the same folder, therefore, I keep getting the "File Not Found" dialog box which I have to click close on each time I run the code. How can I get rid of this annoying thing? I looked through Help and couldn't find the designation fot this particular dialog box (even more annoying!). Any help will be greatly appreciated! Sandy . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
My File Open Dialog is "permanently" maximised | Excel Discussion (Misc queries) | |||
is it possible to disable "save" prompt in excel file on web server? | Excel Discussion (Misc queries) | |||
Add "Favorites" to the file open dialog box | Setting up and Configuration of Excel | |||
Scroll Bar missing "Control" tab in "Format Properties" dialog box | Excel Discussion (Misc queries) | |||
How do I install when "file ZF561407.CAB can not be found" | New Users to Excel |