Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Working with headers in pagesetup

I want to add a header as below. However, I want to replace the word "Test"
with a variable. How do I do that and still retain the formatting?

With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&14Test"
End With


Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Working with headers in pagesetup

Hi Okie

With ActiveSheet.PageSetup
..CenterHeader = "&""Arial,Bold""&14" & _
ActiveSheet.Range("M1")
End With
--

-----
XL2003
Regards

William




"OkieViking" wrote in message
...
I want to add a header as below. However, I want to replace the word
"Test"
with a variable. How do I do that and still retain the formatting?

With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&14Test"
End With


Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Working with headers in pagesetup

Dim myvar
Dim hdr
myvar = ??? 'replace the word "Test"
hdr = "14"& myvar

With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&hdr"
End With

Should get you close to what you want
Mike F
"OkieViking" wrote in message
...
I want to add a header as below. However, I want to replace the word
"Test"
with a variable. How do I do that and still retain the formatting?

With ActiveSheet.PageSetup
.CenterHeader = "&""Arial,Bold""&14Test"
End With


Thanks



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
PageSetup Macro Julian Glass Excel Worksheet Functions 1 March 29th 08 01:54 PM
Working with Headers and Footers Kim Excel Discussion (Misc queries) 1 June 21st 06 10:35 PM
PageSetup Stanley Excel Discussion (Misc queries) 1 December 14th 05 07:21 PM
PageSetup Simon Shaw[_4_] Excel Programming 1 May 28th 04 08:41 AM
VBA 'PageSetup' performance John[_74_] Excel Programming 1 January 29th 04 01:28 AM


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