Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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
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 - 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
Why is the "zoom" option grayed out in "print preview?" sschreiber Excel Discussion (Misc queries) 0 November 29th 07 04:42 PM
In Excel 2003 is there a way to prevent "Save As" and "Print"? lucky2000 Excel Discussion (Misc queries) 3 April 26th 07 02:49 PM
Excel 2000 VBA ActiveWorkbook.FullName Dave Stanwick Excel Programming 2 December 12th 03 03:16 PM
What are the System Tables named "Print Area" & "Print Titles"? Tom Ogilvy Excel Programming 1 August 18th 03 05:38 PM


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