Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel spreadsheet print preview error "nothing to print" | Excel Discussion (Misc queries) | |||
Print Preview Macro | Excel Discussion (Misc queries) | |||
Macro to include Close Print Preview | Charts and Charting in Excel | |||
BeforePrint macro | Excel Discussion (Misc queries) | |||
In print preview I can see all of the error value why is this and. | Excel Discussion (Misc queries) |