Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print "ActiveWorkbook.FullName" always.....but
Hi from italy.....
so sorry for my bad english...:) I try to explain what I search : I want that the code under work always , with all workbook (past and future) : Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim WS As Worksheet For Each WS In ActiveWorkbook.Worksheets WS.PageSetup.LeftHeader = ActiveWorkbook.FullName Next WS End Sub where to put it ??? but i search also the code for print some sheet (If I want) without the "header" simply push a botton on menu-bar. can you hel me ? TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print "ActiveWorkbook.FullName" always.....but
Hi
this has to go in your workbook module: - open your file - hit ALT+F11 to open the VBA Editor - locate in the left window your project and double click on the item 'ThisWorkbook' - paste the code in this module - close the VBA Editor, save the file and try it -- Regards Frank Kabel Frankfurt, Germany "Dante" schrieb im Newsbeitrag ... Hi from italy..... so sorry for my bad english...:) I try to explain what I search : I want that the code under work always , with all workbook (past and future) : Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim WS As Worksheet For Each WS In ActiveWorkbook.Worksheets WS.PageSetup.LeftHeader = ActiveWorkbook.FullName Next WS End Sub where to put it ??? but i search also the code for print some sheet (If I want) without the "header" simply push a botton on menu-bar. can you hel me ? TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print "ActiveWorkbook.FullName" always.....but
"Frank Kabel" ha scritto nel messaggio ... Hi this has to go in your workbook module: - open your file - hit ALT+F11 to open the VBA Editor - locate in the left window your project and double click on the item 'ThisWorkbook' - paste the code in this module - close the VBA Editor, save the file and try it hi i want it work in *all* workbook (past e future) . is possible ? thk for reply |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print "ActiveWorkbook.FullName" always.....but
Hi
then isert this in a new workbook. save this workbook as template (*.xlt file9 and use this template for your future workbooks -- Regards Frank Kabel Frankfurt, Germany "Dante" schrieb im Newsbeitrag ... "Frank Kabel" ha scritto nel messaggio ... Hi this has to go in your workbook module: - open your file - hit ALT+F11 to open the VBA Editor - locate in the left window your project and double click on the item 'ThisWorkbook' - paste the code in this module - close the VBA Editor, save the file and try it hi i want it work in *all* workbook (past e future) . is possible ? thk for reply |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Why is the "zoom" option grayed out in "print preview?" | Excel Discussion (Misc queries) | |||
In Excel 2003 is there a way to prevent "Save As" and "Print"? | Excel Discussion (Misc queries) | |||
Excel 2000 VBA ActiveWorkbook.FullName | Excel Programming | |||
What are the System Tables named "Print Area" & "Print Titles"? | Excel Programming |