Skip to main content
Question

How can I lock the file while editing by VBA?

  • May 21, 2025
  • 4 replies
  • 31 views

Forum|alt.badge.img

Hi all,

 

I us the boxSync file to run the macros but I want to lock the file by macro so other user can not run the macro or update the file at the same moment. Is there any function to automaticaly lock the file when it is opened by user and unclock when closing the file?

 

Thank you!

4 replies

Forum|alt.badge.img

This endpoint lets you lock and unlock a file, but I am not sure how to make this API call using VBA.


Forum|alt.badge.img

Thank you Murtza! I will take a look on that whether I can use it or not.


Forum|alt.badge.img

Hello,

 The link "this endpoint" takes to the page which has the list of APIs, can you please let me know which is the exact API that can be used to lock/unlock a file.

 

Thanks,


Forum|alt.badge.img

Hi , the link is not valid now since the developer website got updated. You need to make a Update call on the file with lock parameter, hope this helps.