Macro needed to check Excel file open

Microsoft Excel 2003 (full product)
March 26, 2012 at 02:50:13
Specs: Windows XP
Hi

I'm still really new to VB, but I'm writing a macro which copies data from spreadsheet to another when a submit button is clicked.

However, because two people could be trying to do this at the same time, I want to include at the beginning of the macro a process where it checks whether the file needed is already open by someone else.

If the file is open, I need it to create a message box asking the user to try clicking submit again in a couple of minutes, with the vbOKonly option.

If the file is not already open, I want the macro to continue running.

Any help would be much appreciated, as I'm going round in circles :-)


See More: Macro needed to check Excel file open

Report •


#1
March 26, 2012 at 06:50:03

Report •

#2
March 26, 2012 at 08:02:34
The file is an excel spreadsheet, where data is copied to from the source (where the submit button is located)

Hope that makes sense!


Report •

#3
Report •

Related Solutions

#4
March 26, 2012 at 09:06:55
It sounds easier to just disable the sharing feature of the workbook, especially if only one person should be editing it at a time.

How To Ask Questions The Smart Way


Report •


Ask Question