Currently have a Macro where a user transfers information to book2, if book 2 is currently having information transferred to it by another user the user will get a pop up saying it is being used and please try again.
However the first part happens then they get a pop up saying :-
File now available - Book 2 now available for editing, Choose Read-Write to open it for editing. (this bit I dont want)
I did try sharing book 2 but that didnt work either.
Currently I have the code below
then some code which transfers data to book 2
then
All I need is to somehow avoid the Popup regarding available for editing. SO when 2 or more user transfers from Book 1 to Book 2 at the same time it will say "The Workbook is being accessed by another user. Please try again", then they run the macro again and if not used will transfer without the available for editing popup appearing
However the first part happens then they get a pop up saying :-
File now available - Book 2 now available for editing, Choose Read-Write to open it for editing. (this bit I dont want)
I did try sharing book 2 but that didnt work either.
Currently I have the code below
Code:
If ActiveWorkbook.ReadOnly = True Then
MsgBox "The Workbook is being accessed by another user. Please try again. ", vbOKOnly, ""
'Exit the workbook.
ActiveWorkbook.Close False
Exit Sub
Else
then some code which transfers data to book 2
then
Code:
ActiveWorkbook.Save
ActiveWindow.Close
Workbooks(NewName).Activate
CutCopyMode = False
ThisWorkbook.Activate
End If
MsgBox "Data has been submitted sucessfully.", vbInformation, "Saved Data"
Application.ScreenUpdating = True
All I need is to somehow avoid the Popup regarding available for editing. SO when 2 or more user transfers from Book 1 to Book 2 at the same time it will say "The Workbook is being accessed by another user. Please try again", then they run the macro again and if not used will transfer without the available for editing popup appearing