Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I writing a workbookbeforesave event but can't get my PageSetup.LeftFooter to work. The event is executed it is just the Pagesetup that doesn't work. Is there any known problem with this? I running excel 2003 sp2. ws.PageSetup.CenterHeader = "test" '''doesn't work ws.Range("A4") = "test" ''' works Code in a Class Module: Public WithEvents App As Application Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim SecurityLevel() SecurityLevel = Array("Secret", "Confidential", "Proprietary", "Public") On Error Resume Next Do Until Level = 1 Or Level = 2 Or Level = 3 Or Level = 4 Level = InputBox("To AFR secure this document type in security level, otherwise cancel.1 = Secret, 2 = Confidential, 3 = Proprietary and 4 = Public.", "Update the date") If Level = 0 Then Exit Sub ''' Cancel pressed End If Loop Wb.Worksheets("Sheet1").PageSetup.LeftFooter = Application.UserName & ", " & "&D" & Chr(10) & "Security Class <" & SecurityLevel(Level) & "" However this works ws.Worksheets("Sheet1").Range("A2") = "test" End Sub Regards JS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WorkbookBeforeSave Problem | Excel Discussion (Misc queries) | |||
Worksheet.Unprotect within WorkbookBeforeSave event fails if Save | Excel Programming | |||
WorkbookBeforeSave | Excel Programming | |||
Excel XP and WorkbookBeforeSave | Excel Programming | |||
Handling WorkbookBeforeClose and WorkbookBeforeSave | Excel Programming |