PC Review


Reply
Thread Tools Rate Thread

Create header/footer txt file and link to Excel worksheets

 
 
marc
Guest
Posts: n/a
 
      24th Jan 2008
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 With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      25th Jan 2008
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create header/footer txt file and link to Excel worksheets marc Microsoft Excel Misc 0 24th Jan 2008 08:15 PM
Can I link a cell's contents to the header or footer in Excel? =?Utf-8?B?ZGpvc2x5bg==?= Microsoft Excel Misc 14 17th Oct 2006 11:03 PM
Is it possible to link the header/footer on a number of worksheets =?Utf-8?B?R3JhaGFtZTE5?= Microsoft Excel Misc 2 17th May 2006 05:10 PM
Set up global custom header and footer in Excel worksheets? =?Utf-8?B?S1JvbGxpbnM=?= Microsoft Excel Worksheet Functions 1 14th Jun 2005 10:50 PM
make custom header and footer in excel apply to all worksheets =?Utf-8?B?QWxleGFuZHJh?= Microsoft Excel Misc 1 27th May 2005 06:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:22 PM.