ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need to print path & file on ALL excel worksheets... (https://www.excelbanter.com/excel-discussion-misc-queries/66469-need-print-path-file-all-excel-worksheets.html)

Buzzerd

Need to print path & file on ALL excel worksheets...
 

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: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Fable

Need to print path & file on ALL excel worksheets...
 

http://www.ozgrid.com/VBA/WorkbookPath.htm


--
Fable


------------------------------------------------------------------------
Fable's Profile: http://www.excelforum.com/member.php...fo&userid=2185
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Marvin P. Winterbottom

Need to print path & file on ALL excel worksheets...
 
select 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

"Fable" wrote:


http://www.ozgrid.com/VBA/WorkbookPath.htm


--
Fable


------------------------------------------------------------------------
Fable's Profile: http://www.excelforum.com/member.php...fo&userid=2185
View this thread: http://www.excelforum.com/showthread...hreadid=503524



Gord Dibben

Need to print path & file on ALL excel worksheets...
 
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 asfiletypeexcel 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 FileNew(not
filenew...) 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 InsertNew 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 & " " & Chr(13) _
& Application.UserName & " " & 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
wrote:


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

Need to print path & file on ALL excel worksheets...
 

Hey all,
Thanks in advance for all the knowledge. Ok I followed the
instructions on:
http://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: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Gord Dibben

Need to print path & file on ALL excel worksheets...
 
Buzz

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 asfiletypeexcel 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 FileNew(not
filenew...) 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 InsertNew 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 & " " & Chr(13) _
& Application.UserName & " " & 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
wrote:


Hey all,
Thanks in advance for all the knowledge. Ok I followed the
instructions on:
http://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


Gord Dibben MS Excel MVP

Buzzerd

Need to print path & file on ALL excel worksheets...
 

I'll get back after I'm done.
Thanks again
Buzz


--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Buzzerd

Need to print path & file on ALL excel worksheets...
 

Hey,
I wasn't exactly clear with my request, I need to have all my exisitng
worksheets print the path & file name when printed. From what I've
read it sounds more like "from this point forward" 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: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Gord Dibben

Need to print path & file on ALL excel worksheets...
 
Buzz

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..........

ToolsMacroRecord 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

FileSave the Personal.xls.

ALT + Q to go back to Excel window.

ToolsMacroMacros. 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 "Hide"

Close Excel and answer "Yes" 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.


Gord


On Wed, 25 Jan 2006 11:20:54 -0600, Buzzerd
wrote:


Hey,
I wasn't exactly clear with my request, I need to have all my exisitng
worksheets print the path & file name when printed. From what I've
read it sounds more like "from this point forward" 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

Need to print path & file on ALL excel worksheets...
 

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
"Hide" - 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: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Gord Dibben

Need to print path & file on ALL excel worksheets...
 
Buzz

You created the Personal.xls?

You copied the Path_All_Sheets macro into a module in Personal.xls?

You hit ALT + Q to return to the Excel window?

When you click on Window no Personal.xls is listed?

Perhaps it is already hidden.

Try WindowUnhide. If listed there, don't unhide it, just leave hidden.


Gord

On Thu, 26 Jan 2006 10:32:51 -0600, Buzzerd
wrote:


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
"Hide" - 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

Need to print path & file on ALL excel worksheets...
 

I tried all you wrote and saved the personal.xls file. When I click
window the unhide button is not clickable and personal.xls is not to be
seen. I must be missing a step somewhere, I'll go back again and see.
Buzz


--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Buzzerd

Need to print path & file on ALL excel worksheets...
 

Ok so I still have a problem when I click window and don't see the
personal.xls file but I'm curious about something, when this is all
said and done everytime I turn on excel from here on I will see the
path and file on each printed page WITHOUT having to go into the macro
file? If I have to go into that each time that nullifies everything.
Please let me know. I want my workers to just go into excel and print
and have that come up ALL the time.
Thanks again.
Buzz


--
Buzzerd
------------------------------------------------------------------------
Buzzerd's Profile: http://www.excelforum.com/member.php...o&userid=30689
View this thread: http://www.excelforum.com/showthread...hreadid=503524


Gord Dibben

Need to print path & file on ALL excel worksheets...
 
Buzz

Don't know where your Personal.xls got to.

Check in the folder at C:\Documents and Settings\username\Application
Data\Microsoft\Excel\XLSTART

If it is not there, you have messed up somewhere.

As an alternative go to John Walkenbach's site and download the add-in
ADDPATH.XLA

http://www.j-walk.com/ss/excel/files/addpath.htm

Distribute this add-in to your workers or place it in a folder that is available
to all if on a network.

You will still have to run it once for each workbook untill all have the code
established.


Gord

On Thu, 26 Jan 2006 14:43:55 -0600, Buzzerd
wrote:


Ok so I still have a problem when I click window and don't see the
personal.xls file but I'm curious about something, when this is all
said and done everytime I turn on excel from here on I will see the
path and file on each printed page WITHOUT having to go into the macro
file? If I have to go into that each time that nullifies everything.
Please let me know. I want my workers to just go into excel and print
and have that come up ALL the time.
Thanks again.
Buzz




All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com