tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have the following macro that opens up a document and runs another macro,
I use it to update a document that lots of people share by creating the changes I want in a macro then running this code and the document is updated without having to hold everyone up.
this all works fine and I wish to carry on doing things this way, except if the document is being used I just get a read only copy then a save as request at the end.
I'd like the macro to stop if the document is read only and record the word "Read Only" in sheet "Data" cell G15.
if the document is not read only then run my macro.
please help if you can
thanks
Tony
MY Current Macro:
I have the following macro that opens up a document and runs another macro,
I use it to update a document that lots of people share by creating the changes I want in a macro then running this code and the document is updated without having to hold everyone up.
this all works fine and I wish to carry on doing things this way, except if the document is being used I just get a read only copy then a save as request at the end.
I'd like the macro to stop if the document is read only and record the word "Read Only" in sheet "Data" cell G15.
if the document is not read only then run my macro.
please help if you can
thanks
Tony
MY Current Macro:
Code:
Sub OpenLondon()
StoreName = "London"
Workbooks.Open ("S:\" & StoreName & "\New Documents Folder\" & "New" & StoreName & ".xlsm")
Workbooks("New" & StoreName & ".xlsm").Activate
Call TonySecret124
Workbooks("New" & StoreName & ".xlsm").Close savechanges:=True
End Sub