Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does someone have this spreadsheet open??

Status
Not open for further replies.

LeanneGodney

Technical User
Mar 7, 2002
175
GB
Hi there,

In Access I am wanting to create a spreadsheet and save it over an existing spreadsheet kept on the server. But I'd first like to check if someone else has this original file open! Cos I don't see the point in going through the creation of the spreadsheet and only afterwards finding that I can't continue because it's already open!

So is there a way through VBA that I can tell if an Excel Spreadsheet is open?

Thanks
Leanne
 
Prior to generating a new excel file try to delete the existing one with a Kill command (Kill "C:\My Data\myfile.xls"). Just trap the resulting error when someone has the file open (probably permission denied) and deal with it accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top