I have a macro which when ran, opens file '1', copies and pastes data into the current file. Then opens file '2', copies and pastes data into current file. Repeats this 5 times from different files.
all files are networked and can be opened by anyone.
is there anyway of adding lines in the macro to say that if the file is already in use THEN a message appears with "file already open, try again later", ELSE carry on with macro. (do this for each file i need to open)
here is the first few lines i have done as an example:
Workbooks.Open FileName:="e:\tracker.xls"
Sheets("Certification").Select
Range("a1").Select
Selection.CurrentRegion.Copy
....etc
any help or advice would be much appreciated
all files are networked and can be opened by anyone.
is there anyway of adding lines in the macro to say that if the file is already in use THEN a message appears with "file already open, try again later", ELSE carry on with macro. (do this for each file i need to open)
here is the first few lines i have done as an example:
Workbooks.Open FileName:="e:\tracker.xls"
Sheets("Certification").Select
Range("a1").Select
Selection.CurrentRegion.Copy
....etc
any help or advice would be much appreciated