View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Subtotal in header

That may be possible, but I don't know how. The difficulty that I see is
that there is no way to add logic to the spooling.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Stefi" wrote in message
...
Hi Bob,

Sorry, perhaps my explanation was not clear: AC06 is not a cell reference,
it's simply a code that by chance resembles XL cell references. On the

other
hand your macro places the same value in the header of all pages. I need a
different value on each pages according to the value of column E on that

page.
Any other idea? See also my post to Gary"s Student!

Regards,
Stefi


"Bob Phillips" ezt írta:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
If .Name = "Sheet1" Then
.PageSetup.LeftHeader = .Range("AC06").Value
End If
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


---
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Stefi" wrote in message
...
Hi All,

I have a sheet subtotalled by column E with page breaks. I'd like to

display
the value of column E on a particular page in the header of that page.

How
can I do that?
E.g.
Page1 (requested value in header: AC06)
A B C D
E F
2006.05.22 5 98 24/2006 AC06 2 000
2006.05.22 5 98 26/2006 AC06 2 000
AC06 Subtotal 4 000
Page2 (requested value in header: BB08)
2006.05.18 5 96 0054187 BB08 44 800
2006.05.18 5 96 0054188 BB08 40 250
2006.05.19 5 97 0054195 BB08 42 840
BB08 Subtotal 127 890

Thanks,
Stefi