I am trying to open a file and if the file is already open, then a pop up window appears ... mentioning the file is already open then we press No button. I want a vba to control this of pressing "No" button through excel vba code.
Dim str As String
str = "C:\Users\Desktop\Test.xlsm"
On Error GoTo Solution
MsgBox "file is open"