Automatically update column with weekdays
You could set a flag in the hidden sheet when a change is made there
Private Sub Worksheet_Change(ByVal Target As Range)
Thisworkbook.fHidden = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
Public fHidden As Boolean
and then trap that flag on exit
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If fHidden Then
ThisWorkbook.Save
End If
End Sub
Private Sub Workbook_Open()
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Maddoktor" wrote in message
...
Hi all,
I have created a workbook that records the user name, date and time the
workbook was opened in a hidden worksheet, but as it is updated it asks
the user whether to save the workbook of the changes or not before
exiting.
I would like the workbook to automatically save ONLY the hidden
worksheet without offering an option to the user. If the user has
modified any other worksheets of the workbook then I would like to
follow the protocol of asking the user to save the complete workbook. At
all times, the hidden worksheet must be save without question every time
the workbook is exited.
Is this possible?
Thanx in advance
Maddoktor
|