View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Header using cell data

This will do it ...

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = _
"Project: " & ActiveSheet.Range("C4") & Chr(10) & _
"Address: " & ActiveSheet.Range("C5")
End Sub

--
Cheers
Nigel



"Wayne" wrote in message
...
I'm trying to create a header that will pull in data from a mergerd cells
which are typically located in mergers cells C4-G4, C5-G5, etc.

I want the header to appear as:-

" Project" & Ative sheet cel C4-G4
" Address" & Active sheet cell C5-G5.....

I've established from previous posts that the code should go in the

workbook
before print event but not really got any further....

Any ideas?