+ Reply to Thread
Results 1 to 5 of 5

Opening linked spreadsheet file in Access

  1. #1
    Art
    Guest

    Opening linked spreadsheet file in Access

    How do I test for an Excel file being available (not open by a user) in
    Access VBA? My code opens a series of Excel files, one at a time, but when I
    encounter a file already open/in use, I need to be able to trap it.
    Currently I get a runtime error and have to quit.
    --
    Art

  2. #2
    Tom Ogilvy
    Guest

    Re: Opening linked spreadsheet file in Access


    http://support.microsoft.com?kbid=138621
    XL: Macro Code to Check Whether a File Is Already Open

    http://support.microsoft.com?kbid=291295
    XL2002: Macro Code to Check Whether a File Is Already Open

    http://support.microsoft.com?kbid=213383
    XL2000: Macro Code to Check Whether a File Is Already Open

    http://support.microsoft.com?kbid=184982
    WD97: VBA Function to Check If File or Document Is Open


    --
    Regards,
    Tom Ogilvy

    "Art" <[email protected]> wrote in message
    news:[email protected]...
    > How do I test for an Excel file being available (not open by a user) in
    > Access VBA? My code opens a series of Excel files, one at a time, but

    when I
    > encounter a file already open/in use, I need to be able to trap it.
    > Currently I get a runtime error and have to quit.
    > --
    > Art




  3. #3
    Bob Phillips
    Guest

    Re: Opening linked spreadsheet file in Access

    You should be able to adapt the solutions in these articels

    http://support.microsoft.com?k*bid=138621
    XL: Macro Code to Check Whether a File Is Already Open


    http://support.microsoft.com?k*bid=291295
    XL2002: Macro Code to Check Whether a File Is Already Open


    http://support.microsoft.com?k*bid=213383
    XL2000: Macro Code to Check Whether a File Is Already Open


    http://support.microsoft.com?k*bid=184982
    WD97: VBA Function to Check If File or Document Is Open


    --
    HTH

    Bob Phillips

    "Art" <[email protected]> wrote in message
    news:[email protected]...
    > How do I test for an Excel file being available (not open by a user) in
    > Access VBA? My code opens a series of Excel files, one at a time, but

    when I
    > encounter a file already open/in use, I need to be able to trap it.
    > Currently I get a runtime error and have to quit.
    > --
    > Art




  4. #4
    Art
    Guest

    Re: Opening linked spreadsheet file in Access

    Thanks for those links, but now I need to do the same thing in an Excel
    macro. The "IsFileOpen" function apparently has no equivalent in Excel. I
    don't want to have to link 100+ spreadsheet files into Access, so this
    process must be done within Excel. Ideas? TIA
    --
    Art


    "Bob Phillips" wrote:

    > You should be able to adapt the solutions in these articels
    >
    > http://support.microsoft.com?kĀ*bid=138621
    > XL: Macro Code to Check Whether a File Is Already Open
    >
    >
    > http://support.microsoft.com?kĀ*bid=291295
    > XL2002: Macro Code to Check Whether a File Is Already Open
    >
    >
    > http://support.microsoft.com?kĀ*bid=213383
    > XL2000: Macro Code to Check Whether a File Is Already Open
    >
    >
    > http://support.microsoft.com?kĀ*bid=184982
    > WD97: VBA Function to Check If File or Document Is Open
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "Art" <[email protected]> wrote in message
    > news:[email protected]...
    > > How do I test for an Excel file being available (not open by a user) in
    > > Access VBA? My code opens a series of Excel files, one at a time, but

    > when I
    > > encounter a file already open/in use, I need to be able to trap it.
    > > Currently I get a runtime error and have to quit.
    > > --
    > > Art

    >
    >
    >


  5. #5
    Tom Ogilvy
    Guest

    Re: Opening linked spreadsheet file in Access

    The code is written for XL. That is what the XL: and XL2000 and XL2002
    means in the title.

    --
    Regards,
    Tom Ogilvy

    "Art" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks for those links, but now I need to do the same thing in an Excel
    > macro. The "IsFileOpen" function apparently has no equivalent in Excel.

    I
    > don't want to have to link 100+ spreadsheet files into Access, so this
    > process must be done within Excel. Ideas? TIA
    > --
    > Art
    >
    >
    > "Bob Phillips" wrote:
    >
    > > You should be able to adapt the solutions in these articels
    > >
    > > http://support.microsoft.com?k*bid=138621
    > > XL: Macro Code to Check Whether a File Is Already Open
    > >
    > >
    > > http://support.microsoft.com?k*bid=291295
    > > XL2002: Macro Code to Check Whether a File Is Already Open
    > >
    > >
    > > http://support.microsoft.com?k*bid=213383
    > > XL2000: Macro Code to Check Whether a File Is Already Open
    > >
    > >
    > > http://support.microsoft.com?k*bid=184982
    > > WD97: VBA Function to Check If File or Document Is Open
    > >
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > "Art" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > How do I test for an Excel file being available (not open by a user)

    in
    > > > Access VBA? My code opens a series of Excel files, one at a time, but

    > > when I
    > > > encounter a file already open/in use, I need to be able to trap it.
    > > > Currently I get a runtime error and have to quit.
    > > > --
    > > > Art

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1