Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
refreshing data from a linked *.dbf database file without opening it. Ahrder Links and Linking in Excel 0 February 27th 09 04:12 AM
When opening Excel - get Access (Read-Only) file and error DeltaDagger Setting up and Configuration of Excel 1 October 31st 06 10:22 AM
Excel File Linked in Access nukeawhale Excel Discussion (Misc queries) 1 January 21st 06 02:41 AM
Long file paths in MS Access Linked Table Manager Todd Huttenstine Excel Programming 1 February 24th 05 06:34 PM
Using OWC10 to access an Excel file with linked SQL Server Charles Dame Excel Programming 3 December 4th 03 05:17 AM


All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"