Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have protected sheet and workbook with password.
I have this code and is working ok. Does anyone have some suggestions to this code, as I am beginner? Private Sub Workbook_BeforeClose(cancel As Boolean) Dim L As Long Application.ScreenUpdating = False ActiveWorkbook.Unprotect (5) Me.Worksheets(1).Visible = True For L = 2 To Me.Worksheets.Count Me.Worksheets(L).Visible = xlVeryHidden Next ActiveWorkbook.Protect Password:="5", Structu=True, Windows:=False ActiveWorkbook.Save End Sub similar is for Open |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
close only one workbook | New Users to Excel | |||
to close a workbook via VBA | Excel Programming | |||
Close a the current workbook and load another specified workbook | Excel Programming | |||
Close a workbook | Excel Programming | |||
How can I close a workbook using VBA? | Excel Programming |