close

Hey all,
Thanks in advance for the knowledge. I need to have as a default the
path and file name on all our excel spreadsheets to be printed on the
bottom of each page. I know you can do individual sheets with the
footer/header but I need this for all. Can it be done? If so, how?
Thanks
Buzz--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: www.excelforum.com/member.php...oamp;userid=30689
View this thread: www.excelforum.com/showthread...hreadid=503524
www.ozgrid.com/VBA/WorkbookPath.htm--
Fable------------------------------------------------------------------------
Fable's Profile: www.excelforum.com/member.php...foamp;userid=2185
View this thread: www.excelforum.com/showthread...hreadid=503524select all the worksheets by clicking on the first one then Shift-clicking on
the last one, then do your page setup and it will apply to all sheets

quot;Fablequot; wrote:

gt;
gt; www.ozgrid.com/VBA/WorkbookPath.htm
gt;
gt;
gt; --
gt; Fable
gt;
gt;
gt; ------------------------------------------------------------------------
gt; Fable's Profile: www.excelforum.com/member.php...foamp;userid=2185
gt; View this thread: www.excelforum.com/showthread...hreadid=503524
gt;
gt;

Buzz

To get path and name on each sheet of an existing workbook you can select all
sheets and set up your header/footer on the active sheet.

All sheets selected will get same set up.

To have it as default on all new workbooks, you can set up a new workbook as you
wish then save asgt;filetypegt;excel template)*.xla)

Name it BOOK and store it in your XLSTART folder.

This will be the template for all new workbooks when you click on Filegt;New(not
filegt;new...) or hit the New Icon

You can also save a new workbook with one sheet in it with your header/footer
set up.

Save As a template. Name it SHEET and store in your XLSTART folder.

This will the default Insertgt;New Worksheet.

You can also use a macro to set all sheets header/footer

Sub Path_All_Sheets()
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
ws.PageSetup.RightFooter = ActiveWorkbook.FullName amp; quot; quot; amp; Chr(13) _
amp; Application.UserName amp; quot; quot; amp; Date
Next
End Sub

Strip out the parts you don't want.Gord Dibben MS Excel MVP

On Fri, 20 Jan 2006 15:37:39 -0600, Buzzerd
gt; wrote:

gt;
gt;Hey all,
gt;Thanks in advance for the knowledge. I need to have as a default the
gt;path and file name on all our excel spreadsheets to be printed on the
gt;bottom of each page. I know you can do individual sheets with the
gt;footer/header but I need this for all. Can it be done? If so, how?
gt;Thanks
gt;Buzz
Hey all,
Thanks in advance for all the knowledge. Ok I followed the
instructions on:
www.ozgrid.com/VBA/WorkbookPath.htm but that only gives me:
[Path]File1(not actually the file name!). I want the drive c:, d: or
L: then folder then file. Is this possible.
Thanks again.
Buzz--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: www.excelforum.com/member.php...oamp;userid=30689
View this thread: www.excelforum.com/showthread...hreadid=503524Buzz

You obviously did not look at all the replies you got.

To get path and name on each sheet of an existing workbook you can select all
sheets and set up your header/footer on the active sheet.

All sheets selected will get same set up.

To have it as default on all new workbooks, you can set up a new workbook as you
wish then save asgt;filetypegt;excel template)*.xla)

Name it BOOK and store it in your XLSTART folder.

This will be the template for all new workbooks when you click on Filegt;New(not
filegt;new...) or hit the New Icon

You can also save a new workbook with one sheet in it with your header/footer
set up.

Save As a template. Name it SHEET and store in your XLSTART folder.

This will the default Insertgt;New Worksheet.

You can also use a macro to set all sheets header/footer

Sub Path_All_Sheets()
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
ws.PageSetup.RightFooter = ActiveWorkbook.FullName amp; quot; quot; amp; Chr(13) _
amp; Application.UserName amp; quot; quot; amp; Date
Next
End Sub

Strip out the parts you don't want.Gord Dibben MS Excel MVP

On Mon, 23 Jan 2006 13:37:26 -0600, Buzzerd
gt; wrote:

gt;
gt;Hey all,
gt;Thanks in advance for all the knowledge. Ok I followed the
gt;instructions on:
gt;www.ozgrid.com/VBA/WorkbookPath.htm but that only gives me:
gt;[Path]File1(not actually the file name!). I want the drive c:, d: or
gt;L: then folder then file. Is this possible.
gt;Thanks again.
gt;Buzz

Gord Dibben MS Excel MVP


I'll get back after I'm done.
Thanks again
Buzz--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: www.excelforum.com/member.php...oamp;userid=30689
View this thread: www.excelforum.com/showthread...hreadid=503524
Hey,
I wasn't exactly clear with my request, I need to have all my exisitng
worksheets print the path amp; file name when printed. From what I've
read it sounds more like quot;from this point forwardquot; but I need this on
past worksheets. WAY too many to copy and paste into new ones. If
that's what the next step is. I am unclear with the macro setup. If
that's the way to go can you be a little more specific on how to set it
up. ie dumb it down!
Thanks again.
Buzz--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: www.excelforum.com/member.php...oamp;userid=30689
View this thread: www.excelforum.com/showthread...hreadid=503524Buzz

You would be best to place the macro into your Personal.xls so's it would be
available for any open workbook.

If you don't have a Personal.xls you can create one..........

With an existing workbook open..........

Toolsgt;Macrogt;Record New Macro. Store in Personal Macro Workbook.

Record some simple steps like copying a cell and pasting it.

Hit the Stop Recording button.

You now have a Personal.xls workbook.

Hit ALT F11 to go to the Visual Basic Editor.

CTRL r to open project explorer.

Find Personal.xls and double-click on Module1.

Copy/paste the macro I provided into that module. Edit out the parts you don't
want like username and date.

Here's a revised copy..................

Sub Path_All_Sheets()
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
ws.PageSetup.RightFooter = ActiveWorkbook.FullName
Next
End Sub

Filegt;Save the Personal.xls.

ALT Q to go back to Excel window.

Toolsgt;Macrogt;Macros. Select the Path_All_Sheets macro and run.

This will place the path on all sheets of the active workbook.

Now go to Window, select Personal.xls and quot;Hidequot;

Close Excel and answer quot;Yesquot; to do you want to save changes to Personal.xls.

It will open hidden when Excel is opened, but any macros will be available for
any open workbook.GordOn Wed, 25 Jan 2006 11:20:54 -0600, Buzzerd
gt; wrote:

gt;
gt;Hey,
gt;I wasn't exactly clear with my request, I need to have all my exisitng
gt;worksheets print the path amp; file name when printed. From what I've
gt;read it sounds more like quot;from this point forwardquot; but I need this on
gt;past worksheets. WAY too many to copy and paste into new ones. If
gt;that's what the next step is. I am unclear with the macro setup. If
gt;that's the way to go can you be a little more specific on how to set it
gt;up. ie dumb it down!
gt;Thanks again.
gt;Buzz
Help,
Thanks in advance for all the help. I followed the instruction but
when I get to the part of - Now go to Window, select Personal.xls and
quot;Hidequot; - there is no where to select Personal.xls. I did this a few
times but still the same thing. What am I doing wrong? I'll tool
around a bit to see if I can find it but as so far I'm lost.
Thanks
Buzz--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: www.excelforum.com/member.php...oamp;userid=30689
View this thread: www.excelforum.com/showthread...hreadid=503524

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()