LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Print preview error from BeforePrint macro

Using the WONDERFUL knowledge this board is loaded with I was able to answer
a question that came up in my training class. How do you get multiple lines
in your footers and how do you adjust the font size.

I came up with this:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = "&07" & ActiveWorkbook.FullName & vbLf
& vbLf
End Sub

Using this they can put the page numbering info in the center footer center
(via the menus) and then the macro will put the full path name in a smaller
font (it's a HUGE path name) in the left section of the footer everything is
great.

This prints perfectly ... but when I try to print preview the sheet I get
the following error message:

Method 'FullName' of object '_Workbook' failed

If I pick debug it goes on just fine but I'd rather not have the error.

Is there someplace else I can put the macro that wouldn't cause this error
on previewing??



 
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
Excel spreadsheet print preview error "nothing to print" ann Excel Discussion (Misc queries) 8 August 23rd 06 08:58 PM
Print Preview Macro Emanuel Violante Excel Discussion (Misc queries) 1 June 2nd 06 11:28 AM
Macro to include Close Print Preview Vic Charts and Charting in Excel 1 January 9th 06 01:06 AM
BeforePrint macro Steve O Excel Discussion (Misc queries) 4 September 21st 05 01:09 AM
In print preview I can see all of the error value why is this and. Jacqueline Excel Discussion (Misc queries) 2 December 9th 04 11:18 PM


All times are GMT +1. The time now is 02:42 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"