Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Create header/footer txt file and link to Excel worksheets

Hi all,

I work for a company that typically has very large and long
engagements. Many reports/schedules/analysis spreadsheets are created
throughout obviously. Each case usually has its own custom headers/
footers specific to that case. Although they can change numerous
times.


Is there a way to create a simple txt file with a header and footer,
and link the excel doc to that so it reads that file everytime it
opens and creates its headers/footers. This would help so if there is
a change to a header/footer layout during the case, I could simply
edit that one file that every spreadsheet is linked to, oppossed to
opening all files.


Thanks for your help in advance.


--Marc
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Create header/footer txt file and link to Excel worksheets

I don't know how to do what you asked about for a text file,
but this psuedo code will give you an idea of how to accomplish
what you describe. Substitute the actual workbook names into
the array and enter your changes for the header into the
quotes where PROJECT NAME GOES HERE appears and it should
change the header for all the sheets in all the workbooks listed in the array.

Sub HdrFtr()
Dim WB As Array
WB = Array(WB1, WB2, WB3, WB4,...WBn) '...WBn means the number of
workbooks.
For i = 0 To UBound(WB)
For j = 1 To WB(i).Sheets.Count
With WB(i).Worksheets(j).PageSetUp.
.CenterHeader = ""
.CenterHeader = &"Century Gothic" &12 &B "PROJECT _
NAME GOES HERE"
Next j
Next i
End Sub

This can be modified so that a user can make the changes by making an entry
into a pop up input box rather than having to change the code.

Sub HdrFtr()
Dim WB As Array
WB = Array(WB1, WB2, WB3, WB4,...WBn) '...WBn means the number of
workbooks.
newStuff = InputBox("Enter revision to project data", "CHANGE DATA")
For i = 0 To UBound(WB)
For j = 1 To WB(i).Sheets.Count
With WB(i).Worksheets(j).PageSetUp.
.CenterHeader = ""
.CenterHeader = &"Century Gothic" &12 &B & newStuff
Next j
Next i
End Sub


"marc" wrote:

Hi all,

I work for a company that typically has very large and long
engagements. Many reports/schedules/analysis spreadsheets are created
throughout obviously. Each case usually has its own custom headers/
footers specific to that case. Although they can change numerous
times.


Is there a way to create a simple txt file with a header and footer,
and link the excel doc to that so it reads that file everytime it
opens and creates its headers/footers. This would help so if there is
a change to a header/footer layout during the case, I could simply
edit that one file that every spreadsheet is linked to, oppossed to
opening all files.


Thanks for your help in advance.


--Marc

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
Create header/footer txt file and link to Excel worksheets marc Excel Discussion (Misc queries) 0 January 24th 08 08:15 PM
Can I link a cell's contents to the header or footer in Excel? djoslyn Excel Discussion (Misc queries) 14 October 17th 06 11:03 PM
Is it possible to link the header/footer on a number of worksheets Grahame19 Excel Discussion (Misc queries) 2 May 17th 06 05:10 PM
Set up global custom header and footer in Excel worksheets? KRollins Excel Worksheet Functions 1 June 14th 05 10:50 PM
make custom header and footer in excel apply to all worksheets Alexandra Excel Discussion (Misc queries) 1 May 27th 05 06:11 PM


All times are GMT +1. The time now is 01:03 PM.

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

About Us

"It's about Microsoft Excel"