Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Because when I try to save the document it give's me the followin message; "you cannot save to this fileformat when the VBA project is protected" here's the code; Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) Dim MyVar On Error GoTo EndHere Application.ScreenUpdating = False ActiveWorkbook.Unprotect 'my code here Application.ScreenUpdating = True ActiveWorkbook.Protect Exit Sub EndHe MyVar = MsgBox(Text1, 16, Text2) End Su -- Lenny_82 ----------------------------------------------------------------------- Lenny_821's Profile: http://www.excelforum.com/member.php...fo&userid=1517 View this thread: http://www.excelforum.com/showthread.php?threadid=27556 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lock/Unlock cells | Excel Worksheet Functions | |||
Lock and Unlock cells using VBA | Excel Discussion (Misc queries) | |||
unlock and lock VBAProject | Excel Programming | |||
Lock/Unlock problem | Excel Programming | |||
Lock / Unlock Cell | Excel Programming |