Using On Error Goto, Still Getting error

My code loops through a list of files in a range. For each file name it goes to a network folder and opens that file, does some work and then closes the file. When the file is not in the folder I get an error on this statement:
'Where "CurrentFileName" is a named range that holds the path and file name
Workbooks.Open Filename:=WorksheetObject.Range("CurrentFileName").Value
So..thinks me...I can just do this and avoid the error:
On Error Go to EndIt
Workbooks.Open Filename:=WorksheetObject.Range("CurrentFileName").Value
EndIt:
On Error Goto 0
BUT..I still get an error when the file is missing from the folder. I have Error Trapping set to Break on Unhandled Errors. If I can't get this to work I try prefacing my workbook open statement by cycling through the files in the folder, but that will slow
down my procedure considerably.
Any help?
tod

Hi Todtown 
Please follow this may be helpfull >>>
String filename = WorksheetObject.Range("CurrentFileName").Value
 Range  cellRange =  WorksheetObject.Range("CurrentFileName")
Check if cellRange is not protected.
First check :  ISFileExist(filename)
Second check : IsOpenpermission(filename)
... Happy Coding : RAJESH BISHT

Similar Messages

  • Error 150:30 used 109 repair tool still getting error

    Elements 8 Organizer is working fine just can not use editor.

         Word is, Adobe will be coming out with a new version of Photoshop soon. 'Fotoshop Universal 2 (FU2 for short) This program will be automatically obsolete the minute you install it. You may not even need a computer to run it. Just insert the disk into your toaster or whatever you have around that features a slot (no pun intended) and it will go to work. FU2 will be a precursor to FU2.1 which will eliminate the need to insert the disk into anything. It will come with it's own slot. You will carry it with you. From that point on, anything you think or do, anywhere, will be color corrected, beveled, textured, drop shadowed, resaturized and 'saved as'. What a world it will be. FU2 Adobe.

  • I backed up my movies and rebuild my computer, and after making sure i'm using the latest version of itunes and quicktime and and making sure i still had spare computer authorizations, i still get error 23132.  Please help.

    I backed up my movies and rebuild my computer, and after making sure i'm using the latest version of itunes and quicktime and and making sure i still had spare computer authorizations, i still get error 23132.  Please help.

    I had this exact issue.  Spent over an hour on the phone with apple support, they couldn't resolve.  Here is what I ended up doing, that worked.
    1.  Turned iTunes match off on all my iOS devices
    2.  Deleted the offending playlists from the iOS device they originated on
    3.  Started iTunes, let it run (literally) for an hour before it became responsive.  First thing I did, before clicking anywere else was disable iTunes match.  If I clicked anywhere, it would clock for another hour.
    4.  Let iTunes run overnight, by morning it had cleaned out the repeating play lists.  This got my Mac/iTunes back to an operable state.
    5.  Restore iPhones from backup in iTunes.
    What was causing my issue was a single playlist that was created on an iPhone, then suddenly showed up with several thousand duplicates on my other iPhone.  The culprit playlist did not, for some reason, duplicate itself on my two iPads.  Apple support seemed to think it was because the problem iPhone tried to sync the playlist to iCloud over and over again unsuccessfully, then it finally went through and populated the thousands of blank/failed playlists which then tried to propigate to iTunes and my other iOS devices.  Seems like a reasonable theory.
    I have not yet re-enabled iTunes match.  So, no idea what will happen if I decide to go back down that rabbit hole.

  • ITunes 10.5.2 failed on my Windows XP system.  Now my phone is not recognized.  I tried installing manually.  I tried to repair using Add/Remove programs.  Still get errors.

    Attempted update to iTunes 10.5.2 failed on my Windows XP system.  Now my phone is not recognized.  I tried installing manually.  I tried to repair using Add/Remove programs.  Still get errors.

    Try doing it in a WIndows Safe mode - Restart computer and hit F8 key right after your see BIOS check and choose "Safe mode with networking"
    Do the SFC /SCANNOW again.
    If that does not work, whilst in safe mode, download Free Malwarebyte software from CNET's Download.com.  Install, update virus definition then perform a full scan.  Remove if it did find some viruses or trojans.  Restart computer.
    Back to regular windows, do the SFC /SCANNOW again.
    If that doesnot work, check to see if your Hard drive has errors or bad sectors
    GO START BUTTON /COMPUTER, right mouse click OS (C:) and choose "Properties"
    Choose "Tools" tab and under error checking, click "Check Now".
    Make sure "Scan for and attempt recovery of bad sectors" is checked and click start.
    Restart windows will perform the above task to fix errors  This may take hours depends on how big is your Hard Drive
    Good Luck!!.

  • Trying to install Creative Cloud Desktop on windows 8.1, I've tried everything. Cloud Cleaner, removed all Adobe products from computer, ran in Administrator Deleted everything still get error code 1

    I've tried everything. Cloud Cleaner, removed all Adobe products from computer, ran in Administrator Deleted everything still get error code 1 noting in all the troubleshoots have helped.

    Error Code 1: "Failed to install" | Creative Cloud Desktop :
    https://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html

  • Still getting error 4310 with itunes 11 when trying to burn a disc (and my comp is new)!!

    Help downloaded itunes 11 still getting error 4310 when buring to a disc. the computer is new. 

    whydoyouneedtoknow wrote:
    .... Given the number of people having the same issue, and given that this issue has been around for several years, it's crazy that this isn't fixed.
    I concur!! Come on Apple!!!

  • During recovery on iPhone 4 I got : The iPhone could not be restored. Un unknown error occurred ( 3004 ). Then - iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes.Then I get error 3004

    During recovery on iPhone 4 I got : The iPhone could not be restored. Un unknown error occurred ( 3004 ). Then - iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes.Then I get error 3004 again. Latest iTunes and OS updates. I cant use the phone now. I did restart the destop,unplug the usb,...etc. Same iTune logo ,arrow and USB on the screen.THANK YOU SO MUCH,...!

    Perhaps the information in this Apple support article will help:
    http://support.apple.com/kb/TS3694#error3004
    Regards.

  • HT204382 Jfiles, still getting error message that required codec is not available -- Help!

    Just installed Telestream to open wmv files, but still getting error message that required codec is not available -- Help!

    I'm still getting that same message how did you fix it? i installed the wmv player or Flip4Mac (i'm unsure if thats the same program), but even after i am still getting the pop up saying " The movie ____.avi" can't be opened. What am i doing wrong?

  • Trying to log into firefox but keep getting firefox is in offline mode and can't browse the web, I've unchecked the work offline in the file menu but still get error message...

    trying to log into firefox but keep getting firefox is in offline mode and can't browse the web, I've unchecked the work offline in the file menu but still get error message...

    The work offline option can be found from Firefox button -> Web developer or from the menubar toolbar -> Work offline (Or at least thats what happens in Windows).
    Have you any other reason for being offline; router off, firefox not dialing up or whatever. Or is security software or a firewall blocking firefox, or a network connection, or firefox setting etc set wrongly.
    See also
    *[[cannot connect after upgrading firefox]]
    *[[options window - advanced panel]]
    * [[error loading web sites]]

  • My billing address is correct, but the i keep getting that my security code is incorrect and can't download apps.  I have re-entered all of my information in my account, but still get error message.  How to over-ride?

    My billing address is correct, but the i keep getting that my security code is incorrect and can't download apps.  I have re-entered all of my information in my account, but still get error message.  How to over-ride?

    If you have American Express, your 4-digit security code is on the front. If you have VISA or MasterCard, your 3-digit security code is outside the signature block on the back of your credit card. It happens to me also.

  • Still getting ERROR 1602 when updating.. I've tried everything... HELP!

    I have tried the following, and no luck.
    - Uninstalling iTunes and Apple Mobile Device, then reinstalling them after reboot.
    - Plugging into different USB ports, and blowing dust out of them.
    - Rebooting iPhone multiple times.
    - Clicking "Restore" instead of "Update". Still get error message.
    - Erasing the patch file and re-downloading it.
    The only thing I haven't done is call customer support because I hate dealing with stuff like this over the phone. Are there any other options, or should I plan on making a trip to an Apple store?
    Thanks for any help guys and sorry about another thread relating to this. I'm just extremely frustrated...

    There is some help here:
    http://discussions.apple.com/thread.jspa?threadID=1343034&tstart=0

  • Im getting errors when i do a mem test on my hp a6000f.....ive replaced the ram and still get errors

    im getting errors on mem test, Ive replaced the ram, still get errors. How do I disable the L2 cache....on hp a6000f, I dont see anywhere to do it while im in the BIOS/ CMOS setup
      I get error code : BIOME-1

    Here is what you should do to trouble shoot your problem.
    Open up the composition that is giving you problems
    Your error message tells you that you are having problems with the Shatter effect so select the layer with the shatter effect and turn the effect off
    Try a ram preview
    If the ram preview is successful add a solid to your comp
    Copy your shatter effect and paste it to the new solid you created
    Turn off all other layers
    Try a ram preview
    If the ram preview crashes go back to step 6 and reset shatter and try again
    If the ram preview is successful start adding the properties from your original shatter effect until you get a crash.
    If the ram preview works the first time you try step 6 then there is something wrong with the combination of shatter and the original layer it was applied to so remove shatter from that layer, pre-compose that layer moving all attributes to the new layer then paste the working shatter from the solid to the pre-comp, turn off the solid and try another ram preview.
    Do you kind of get the procedure here. When something is causing a crash first isolate that problem, try it on something simple, then try different things until you can reproduce the crash. Make sure you are saving copies of your project so you can easily go back.
    If you can't figure out what settings in Shatter are causing the crash then we need to know everything there is to know about your composition and see a screenshot or the project file. If it is the footage that is causing the crash then you need to transcode, recompress, or in some other way change the format of the footage. There is nothing we can surmise from the details you have given us that give us any clue why shatter is crashing. It usually does not. I can't think of the last time it caused a crash for me. The only possible thing I can think of that would be causing a crash is that the number of particles is causing your system to run out of memory.

  • We are using jni.h but its getting errors, please check it this

    We are using jni.h but its getting errors, please check it this
    Calling from a .dll using Java and JNI - by Borland Developer Support Staff
    Abstract:Basic JNI example: making a Win32 API call
    Making Native Windows API calls from within a Java Application
    One of the main points of Java is to be completely platform independent. However, sometimes it will occur that the developer of an
    application will know that his or her application is only going to be run on a specific platform, for example, Win32.
    NOTE: This example assumes that you are using JDK 1.2 or later.
    Below are the steps for writing a Java application that makes a Win32 API call. The application generates a Swing Jframe and makes it
    system modal, or gives it the �Always On Top� functionality, similar to that of the Windows NT Task Manager.
    Steps to follow:
    1. Write the Java code for the application
    2. Run javah.exe on your .class file to generate a C header file
    3. write the implementation of your native methods
    4. create the shared library
    5. run the application
    1. Write the Java code for the application
    import java.awt.*;
    import sun.awt.*;
    import sun.awt.windows.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Frame1 extends JFrame {
    int windowHWND = 0;
    JButton jButton1 = new JButton();
    public Frame1() {
    //windowHWND = this.getHwnd();
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    public int getHwnd() {
    DrawingSurfaceInfo w = (DrawingSurfaceInfo) ((DrawingSurface) getPeer()).getDrawingSurfaceInfo();
    w.lock();
    WDrawingSurfaceInfo win32 = (WDrawingSurfaceInfo) w;
    int hwnd = win32.getHWnd();
    w.unlock();
    return hwnd;
    static {
    System.loadLibrary("windowOnTop");
    public static native void WindowAlwaysOnTop(int hwnd, boolean flag);
    public static void main(String[] args) {
    Frame1 frame11 = new Frame1();
    frame11.setSize(400,400);
    frame11.setVisible(true);
    private void jbInit() throws Exception {
    jButton1.setText("jButton1");
    this.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(WindowEvent e) {
    this_windowOpened(e);
    public void windowClosing(WindowEvent e) {
    this_windowClosing(e);
    this.getContentPane().add(jButton1, BorderLayout.NORTH);
    void this_windowOpened(WindowEvent e) {
    windowHWND = this.getHwnd();
    System.out.println("the value is: " + this.getHwnd());
    this.WindowAlwaysOnTop(windowHWND, true);
    void this_windowClosing(WindowEvent e) {
    System.exit(0);
    Once the code is written, compile it with Jbuilder or the command line javac.exe tool which will result in a generated .class file. You will use
    this .class file in the next step.
    2. Run javah.exe on your .class file to generate a C header file
    The following line represents the basic syntax for running javah.exe:
    javah Frame1
    where Frame1 is the name of the argument class.
    When you run javah.exe, it will generate a header file by the same name as your implementation but with a .h file extension. For this
    example the .h file that was generated from the above Java code will be emitted being that it is quite large.
    NOTE: Make sure that when you run javah.exe, it is the javah.exe that came with the same JDK that you will be compiling with as there may
    be some issues with using a version of javah.exe that is different from that of the JDK you are using to compile.
    3. write the implementation of your native methods
    Now that you have your Java source and your C header file, it is time to write the implementation of your native methods.
    Following is the C code that corresponds to the native methods declared in the Java code listed in step 1:
    #include "jni.h"
    #include "Frame1.h"
    #include <stdio.h>
    #include<windows.h>
    JNIEXPORT void JNICALL Java_Frame1_WindowAlwaysOnTop(JNIEnv *env, jclass obj, jint hwnd, jboolean flag)
    if (flag)
    SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    else
    SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    return;
    You will notice several things: one is that the function signature has �Java_Frame1_� preceeding the name of the function. If there was a
    package statement in the Java source, it would appear after ��Frame1_� in the function signature.
    Second, you will notice the #include �jni.h�. Normally this would be #include<jni.h>, depending on how you have your libraries set up within
    your C compiler.
    4. create the shared library
    Now you are ready to create the shared library. Using your C compiler, create a .dll file with the code from the C implementation file. Refer
    to the doccumentation of the C compiler for details on creating a .dll file.
    For those interested in using Borland C++ Builder:
    If you have got it installed, you could use Borland C++ Builder 3 or C++ Builder 4 to create your DLL file. If this is the case, you would use
    File | New... | DLL C++ Builder will then generate some code for you, and you will just need to add your implementation code to the code
    which was generated.
    Remember in the Java code in step one there is a line:
    static {
    System.loadLibrary("windowOnTop");
    �windowOnTop� is the name of the .dll file. You can name it whatever you want, just make sure that you specify the appropriate name when
    loading the library.
    5. run the application
    Finally you are ready to run the application. From the command line use java.exe and as the argument specify the name of the class that
    you compiled in step one. Once the system loads your DLL, the window that the VM creates should mimic the �Always On Top�
    functionality.
    We are getting errors like this
    �Compiling JNI.H:
    Error JNI_MD.H 23: , expected
    Error JNI.H 115: Declaration missing
    Error JNI.H 200: ) expected
    Error JNI.H 202: ) expected

    #include "jni.h"
    #include "Frame1.h"
    #include <stdio.h>
    #include<windows.h>
    JNIEXPORT void JNICALL Java_Frame1_WindowAlwaysOnTop(JNIEnv *env, jclass obj, jint hwnd, jboolean flag)
    if (flag)
    SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    else
    SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    return;
    We are getting errors like this
    �Compiling JNI.H:
    Error JNI_MD.H 23: , expected
    Error JNI.H 115: Declaration missing
    Error JNI.H 200: ) expected
    Error JNI.H 202: ) expected

  • Deleted items from Ipod Nano to make room for new. Emptied trash. Still getting error message when I try to copy items from ITunes to Ipod. What should I do now?

    Deleted items from Ipod Nano to make room for new. Emptied trash. Still getting error message when I try to copy items from ITunes to Ipod. What should I do now?

    If you delete songs (and other items) from the main iTunes library, yes, you need to empty the Trash because iTunes puts the song files into the Trash.  When deleting items from an iPod, the items are not being deleted from the main iTunes library, so nothing should end up in the Trash.
    Hopefully, you are not deleting items from your main iTunes library, just to sync those deletions from the iPod.  If you are, there is a better way.  You can post back if you want more info...

  • I can't sign into my account, have reset password but still get error message

    I can't sign into my account, have reset password but still get error message

    Please give full details about your setup and problem, so that we may be able to understand it.

Maybe you are looking for

  • Oracle 8i database data recover problem

    Hi hi, I've recently encountered a problem on how to restoring data from old oracle folders to a new oracle 8i database. Originally, my oracle 8i was installed in windows 2000 server on a harddisk (J:\oracle old) separated from that the OS (windows 2

  • Common video dimensions and bit rates for dynamic streaming?

    I'm going to be converting my videos to flv and am trying to decide what to use for video dimensions and bit rates.  Some of my users have slow computers and connections so I'm thinking 150 on the low end.  Is there a common practice?  What has worke

  • Report on Orders that have Order Lines modified during the period

    hi, I am a Beginner, PLEASE I NEED A HELP Report on Orders that have Order Lines modified during the period

  • 2LIS_02_HDR : Source System ID error

    Trying to upload from this datasource in 3.5 environment. I keep getting error while extracting, erroneous data in PSA. Source System ID not found, how do I fix this? Thanks in advance Fran

  • Windows 7 - sound stuttering, cracking - Flash crashes

    Hi, I have a Mac Mini and a 1st gen MacBook Air. On both I used to run Windows XP and everything worked just fine. Now, I have installed Windows 7 (RTM) on both machines and experience the very same issues on both. I tried multiple Realtek HD audio d