Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Worksheet name in footer

Hi all,

Relatively simple one I hope. Trying to insert a footer that automatically
updates to the name of the current worksheet. I've got &[Path] to show the
directory, &[File] to show the file name, but what would be the short way to
get the worksheet name in the footer? &[???]

Thanks in advance,

Mike
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Worksheet name in footer

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.LeftFooter = .Name
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"mike_vr" wrote in message
...
Hi all,

Relatively simple one I hope. Trying to insert a footer that automatically
updates to the name of the current worksheet. I've got &[Path] to show the
directory, &[File] to show the file name, but what would be the short way
to
get the worksheet name in the footer? &[???]

Thanks in advance,

Mike



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Worksheet name in footer

Hi Bob,

Thanks for that, but unfortunately not exactly what I'm after - sorry,
should have been clearer!!

I've got a macro that inserts the path, worksheet, filename. However, I've
found that the problem with this is that once it's in, it doesn't update if I
save the book as a new book or update the worksheet name. I.e. it takes a
snapshot of what the file is and inserts it as a footer, but when I save to a
new month it doesn't update unless I run the macro again.

I have noticed though that the &[path] and &[File] methods do update when
saved as a new workbook so was hoping that there would be a similar way of
adding the worksheet name.

Any thoughts?

Thanks,

Mike

"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.LeftFooter = .Name
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"mike_vr" wrote in message
...
Hi all,

Relatively simple one I hope. Trying to insert a footer that automatically
updates to the name of the current worksheet. I've got &[Path] to show the
directory, &[File] to show the file name, but what would be the short way
to
get the worksheet name in the footer? &[???]

Thanks in advance,

Mike




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Worksheet name in footer

&[Tab]

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mike_vr" wrote in message ...
| Hi Bob,
|
| Thanks for that, but unfortunately not exactly what I'm after - sorry,
| should have been clearer!!
|
| I've got a macro that inserts the path, worksheet, filename. However, I've
| found that the problem with this is that once it's in, it doesn't update if I
| save the book as a new book or update the worksheet name. I.e. it takes a
| snapshot of what the file is and inserts it as a footer, but when I save to a
| new month it doesn't update unless I run the macro again.
|
| I have noticed though that the &[path] and &[File] methods do update when
| saved as a new workbook so was hoping that there would be a similar way of
| adding the worksheet name.
|
| Any thoughts?
|
| Thanks,
|
| Mike
|
| "Bob Phillips" wrote:
|
| Private Sub Workbook_BeforePrint(Cancel As Boolean)
| With ActiveSheet
| .PageSetup.LeftFooter = .Name
| End With
| End Sub
|
| 'This is workbook event code.
| 'To input this code, right click on the Excel icon on the worksheet
| '(or next to the File menu if you maximise your workbooks),
| 'select View Code from the menu, and paste the code
|
|
| --
| HTH
|
| Bob
|
| (there's no email, no snail mail, but somewhere should be gmail in my addy)
|
| "mike_vr" wrote in message
| ...
| Hi all,
|
| Relatively simple one I hope. Trying to insert a footer that automatically
| updates to the name of the current worksheet. I've got &[Path] to show the
| directory, &[File] to show the file name, but what would be the short way
| to
| get the worksheet name in the footer? &[???]
|
| Thanks in advance,
|
| Mike
|
|
|


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Worksheet name in footer

Spot on, thank you very much!!

"Niek Otten" wrote:

&[Tab]

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mike_vr" wrote in message ...
| Hi Bob,
|
| Thanks for that, but unfortunately not exactly what I'm after - sorry,
| should have been clearer!!
|
| I've got a macro that inserts the path, worksheet, filename. However, I've
| found that the problem with this is that once it's in, it doesn't update if I
| save the book as a new book or update the worksheet name. I.e. it takes a
| snapshot of what the file is and inserts it as a footer, but when I save to a
| new month it doesn't update unless I run the macro again.
|
| I have noticed though that the &[path] and &[File] methods do update when
| saved as a new workbook so was hoping that there would be a similar way of
| adding the worksheet name.
|
| Any thoughts?
|
| Thanks,
|
| Mike
|
| "Bob Phillips" wrote:
|
| Private Sub Workbook_BeforePrint(Cancel As Boolean)
| With ActiveSheet
| .PageSetup.LeftFooter = .Name
| End With
| End Sub
|
| 'This is workbook event code.
| 'To input this code, right click on the Excel icon on the worksheet
| '(or next to the File menu if you maximise your workbooks),
| 'select View Code from the menu, and paste the code
|
|
| --
| HTH
|
| Bob
|
| (there's no email, no snail mail, but somewhere should be gmail in my addy)
|
| "mike_vr" wrote in message
| ...
| Hi all,
|
| Relatively simple one I hope. Trying to insert a footer that automatically
| updates to the name of the current worksheet. I've got &[Path] to show the
| directory, &[File] to show the file name, but what would be the short way
| to
| get the worksheet name in the footer? &[???]
|
| Thanks in advance,
|
| Mike
|
|
|



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
Different font in footer on first worksheet than the others watchtower83 Excel Discussion (Misc queries) 6 January 2nd 07 08:31 PM
how to include a variable in the header and/or footer of a worksheet tmacke Excel Discussion (Misc queries) 2 April 14th 06 10:13 PM
hyperlinking worksheet info to the footer sadie_m_lady Excel Discussion (Misc queries) 0 February 15th 06 05:51 PM
Can I put a footer in Excel on first page of a worksheet only. Tanya Excel Discussion (Misc queries) 1 June 16th 05 05:08 PM
How can I insert a value from an Excel Worksheet into a footer? S Barker Excel Discussion (Misc queries) 4 March 30th 05 01:40 AM


All times are GMT +1. The time now is 06:41 AM.

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"