Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Hi is there anyway i can set up a workbook so that it automaically saves when you close it (every time)? also, can i password protect closing a workbook so that you need to put a password in to close the file? thanks rufusf -- rufusf |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The following event procedure will prompt for a password. If the
password is correct, it will save the file and then close. Else it will cancel the closing process. Private Sub Workbook_BeforeClose(Cancel As Boolean) myStr = InputBox("Password required for closing") If myStr = "my set password" Then Me.Save Else Cancel = True End If End Sub To install: Alt+F11 to go to the VBA IDE In the Project Explorer (top-left subwindow) double-click the ThisWorkbook icon. In the code page that appears paste the code above. HTH Kostis Vezerides |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() thank you very much - I will give this a try -- rufusf |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there any way to recover changes after closing w/o saving? | Excel Discussion (Misc queries) | |||
Saving worksheet as webpage | Excel Discussion (Misc queries) | |||
Closing Excel without saving | Excel Discussion (Misc queries) | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) | |||
Closing Excel | Excel Discussion (Misc queries) |