LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default File name in Footer without ".xls"

Thanks a lot!

--

igor


"Ron Rosenfeld" wrote:

On Wed, 24 Sep 2008 13:10:01 -0700, Igor
wrote:

Hi,

Does anyone know how to eliminate the extension from the File Name added to
the Footer?

I want to add the File Name to the Footer but without the extension.

Thanks in advance.


You can use a Workbook Before Print event macro.

To enter the macro, <alt-F11 opens the VB Editor.

In the project that is your workbook, double click on ThisWorkbook, and paste
the code below into the window that opens.

=================================
Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.PageSetup.RightFooter = Left(ThisWorkbook.Name, _
InStrRev(ThisWorkbook.Name, ".") - 1)
Next ws
End Sub
===============================
--ron



 
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
Converting "uppercase" string data to "lower case" in CSV file [email protected] Excel Discussion (Misc queries) 2 August 12th 08 08:36 PM
text string: "91E10" in csv file auto converts to: "9.10E+11" [email protected] Excel Discussion (Misc queries) 2 August 12th 08 03:13 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
Utility to "clean up" or "defrag" large Excel file Sabrina Excel Discussion (Misc queries) 3 January 12th 06 09:57 PM


All times are GMT +1. The time now is 08:58 AM.

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"