Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default changing footer before save

Hello Everyone

We want to change the footer when the save event occurs. To do so, we wrote our code in subroutine objApp_WorkbookBeforeSave . We have confirmed that the subroutine objApp_WorkbookBeforeSave gets executed when a workbook is saved by tracing the execution. Although, every statement in the subroutine gets executed, the footer does not change. Can someone please help

Following is our code in Subroutine WorkbookBeforeSave

Private Sub objXLApp_WorkbookBeforeSave(ByVal wbkSaveBook
As Excel.Workbook, ByVal blnSaveAsUI As Boolean,
Cancel As Boolean

Dim shtSheet As Objec
Dim strHeaderFooter As Strin


wbkSaveBook.ActiveSheet.Range("a1").Value = "india

' Put the footer into all sheet
For Each shtSheet In wbkSaveBook.Sheet


With shtSheet.PageSetu

.LeftHeader = "LH
.CenterHeader = "CH
.RightHeader = "RH
.LeftFooter = "LF
.CenterFooter = "CF
.RightFooter = "RF

End Wit

Next shtShee

End Su

We are using excel 2000

Thanks
Karthi


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default changing footer before save

Works fine for me.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Karthik Palaniappan" wrote in message
...
Hello Everyone,

We want to change the footer when the save event occurs. To do so, we

wrote our code in subroutine objApp_WorkbookBeforeSave . We have confirmed
that the subroutine objApp_WorkbookBeforeSave gets executed when a workbook
is saved by tracing the execution. Although, every statement in the
subroutine gets executed, the footer does not change. Can someone please
help.


Following is our code in Subroutine WorkbookBeforeSave:


Private Sub objXLApp_WorkbookBeforeSave(ByVal wbkSaveBook _
As Excel.Workbook, ByVal blnSaveAsUI As Boolean, _
Cancel As Boolean)

Dim shtSheet As Object
Dim strHeaderFooter As String


wbkSaveBook.ActiveSheet.Range("a1").Value = "india"

' Put the footer into all sheets
For Each shtSheet In wbkSaveBook.Sheets


With shtSheet.PageSetup

.LeftHeader = "LH"
.CenterHeader = "CH"
.RightHeader = "RH"
.LeftFooter = "LF"
.CenterFooter = "CF"
.RightFooter = "RF"

End With

Next shtSheet

End Sub

We are using excel 2000.

Thanks,
Karthik




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default changing footer before save

Hi Bob

Thank you for the quick response.

May I know the version number of Excel in your PC. for example, mine is Excel 2000 version 9.0.0.3822.

Thanks
Karthik
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default changing footer before save

Karthik,

Mine is Excel 2000 version 9.0.3821 SR-1, XP pro.

But it seems straightforward what you are doing, so it should work.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Karthik Palaniappan" wrote in message
...
Hi Bob,

Thank you for the quick response.

May I know the version number of Excel in your PC. for example, mine is

Excel 2000 version 9.0.0.3822.

Thanks,
Karthik



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default changing footer before save

Thanks Bob. You were right. The macro worked if IManage(Document Management System from www.interwoven.com) was uninstalled.

"Bob Phillips" wrote:

Karthik,

Mine is Excel 2000 version 9.0.3821 SR-1, XP pro.

But it seems straightforward what you are doing, so it should work.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Karthik Palaniappan" wrote in message
...
Hi Bob,

Thank you for the quick response.

May I know the version number of Excel in your PC. for example, mine is

Excel 2000 version 9.0.0.3822.

Thanks,
Karthik




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing the size of the footer TRodriquez Excel Discussion (Misc queries) 1 July 17th 06 10:27 PM
Save Custom Footer travismp Excel Discussion (Misc queries) 0 February 17th 06 07:45 PM
Changing date format in a footer Gord Dibben Excel Discussion (Misc queries) 2 December 9th 05 06:36 PM
Changing (Part of) Header Without Changing Footer or Rest of Header Paul Cross Excel Programming 3 May 20th 04 10:42 PM
Changing Save As Type in Save as dialog box Phill Excel Programming 2 August 22nd 03 12:38 PM


All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"