Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default check if file already is open

Hi all,
In a vba routine a specific workbook has to be opened, but if it´s already
open (by another user) it shouldn´t be opened as read-only. Instead i will
interrupt the routine and give a msg "the file is already opened by another
user, the routine is interrupted". I cant find a method to check if the file
is open.
I have a similar question when updating PowerPoint slides from Excel. In
that case I will check if a specific power-point is opened.
Thanks in advance
Regards
Mats
ESI Update
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default check if file already is open


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

"Mats Nilsson" wrote in message
...
Hi all,
In a vba routine a specific workbook has to be opened, but if it´s already
open (by another user) it shouldn´t be opened as read-only. Instead i will
interrupt the routine and give a msg "the file is already opened by

another
user, the routine is interrupted". I cant find a method to check if the

file
is open.
I have a similar question when updating PowerPoint slides from Excel. In
that case I will check if a specific power-point is opened.
Thanks in advance
Regards
Mats
ESI Update



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default check if file already is open

Hi Tom,
Thanks for your help. It seems to work in my routines.
Regards,
Mats
--
ESI Update


"Tom Ogilvy" wrote:


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

"Mats Nilsson" wrote in message
...
Hi all,
In a vba routine a specific workbook has to be opened, but if it´s already
open (by another user) it shouldn´t be opened as read-only. Instead i will
interrupt the routine and give a msg "the file is already opened by

another
user, the routine is interrupted". I cant find a method to check if the

file
is open.
I have a similar question when updating PowerPoint slides from Excel. In
that case I will check if a specific power-point is opened.
Thanks in advance
Regards
Mats
ESI Update




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
How to check for Open File! Ayo Excel Discussion (Misc queries) 2 August 11th 08 06:55 PM
check if file is already open mohavv Excel Discussion (Misc queries) 1 October 15th 07 12:08 AM
How to check Excel file already Open Rudy S Excel Programming 2 January 25th 05 02:00 PM
Check file open status kaon[_18_] Excel Programming 4 July 19th 04 05:16 AM
check if a file exists / is open Mark Kubicki Excel Programming 1 December 4th 03 05:56 PM


All times are GMT +1. The time now is 12:19 PM.

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"