View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Romanian37[_7_] Romanian37[_7_] is offline
external usenet poster
 
Posts: 1
Default Printer Set Up in VBA

Try this, it takes all of name from cell reference C5 and puts it t
centerheader.



Sub Macro1()

Dim TitleOfDocument As String

'set variable titleofdocument to be value of cell C5
TitleOfDocument = Cells(5, 3).Value
'
With ActiveSheet.PageSetup
.CenterHeader = TitleOfDocument
End With
End Su

--
Message posted from http://www.ExcelForum.com