I have a macro in my personal.xlsb file that I utilize on a shared file. I have a public boolean variable used to set to TRUE when the marco is run.
On the shared file, on the ThisWorkbook object, how do I reference/connect the public variable in my personal macro?
here is my code on the shared file...
Also, is it possible to make it so this doesn't crash when other uses open and close the file, as they won't have access to my personal.xlsb?
On the shared file, on the ThisWorkbook object, how do I reference/connect the public variable in my personal macro?
here is my code on the shared file...
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Saved = MacroRunFlag = True
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If MacroRunFlag = True Then
MsgBox "File will not save after running the Macro."
Cancel = MacroRunFlag
Saved = True
End If
End Sub
Also, is it possible to make it so this doesn't crash when other uses open and close the file, as they won't have access to my personal.xlsb?
Last edited: