S
Skygod
We extract data from a MySQL database which involves a large number of
lookups from two pivot tables and a flatfile table. There is double testing
for N/A events as well, so recalculation takes a long time.
To avoid this, we write out the data as values into a new spreadsheet, so
that filters can be applied and recalc time is minimal.
We now want to protect the value data from employee 'theft' by disabling
Save and Save As functionality.
I can do this using the following VBA in ThisWorkbook
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "'Company policy prohibits 'Save' and 'Save As' functionality!"
Cancel = True
End Sub
The Catch-22 though is that the master macro that writes the data to the
spreadsheet is no longer able to save either.
My VBA skills are extremely limited, so any simple to follow ideas on how to
accomplish this would be appreciated.
lookups from two pivot tables and a flatfile table. There is double testing
for N/A events as well, so recalculation takes a long time.
To avoid this, we write out the data as values into a new spreadsheet, so
that filters can be applied and recalc time is minimal.
We now want to protect the value data from employee 'theft' by disabling
Save and Save As functionality.
I can do this using the following VBA in ThisWorkbook
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "'Company policy prohibits 'Save' and 'Save As' functionality!"
Cancel = True
End Sub
The Catch-22 though is that the master macro that writes the data to the
spreadsheet is no longer able to save either.
My VBA skills are extremely limited, so any simple to follow ideas on how to
accomplish this would be appreciated.