Check current workbook link and compared to custom address
Sub Success()
'check current path
Path = ActiveWorkbook.Path
'Range("A1") = ActiveWorkbook.Path
'if current path not same, exit
If Path <> "C:\Users\othmmohd\Desktop" Then
MsgBox "Please use Jobs in Lab - Macro from shared drive."
ThisWorkbook.Close savechanges:=False
End If
End Sub
No comments:
Post a Comment