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

Hello,
I wonder if you can help me

I know how to format a string within a header

eg:
sheet1.pagesetup.centerheader="&""ariel,bold"&""&1 4HELLO"
formats the word HELLO to bold and size 14

However, instead of HELLO, I need to put in a variable
which represents a date.
If anyone can help I'd be very grateful

Many thanks
Geoff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default formatting headers

Hi:

Try:

Sheet1.PageSetup.CenterHeader = "&""Arial""&14&B" & _
Format(Date, "d-mmm-yyyy")

Regards,

Vasant.

"need-A-hand" wrote in message
...
Hello,
I wonder if you can help me

I know how to format a string within a header

eg:
sheet1.pagesetup.centerheader="&""ariel,bold"&""&1 4HELLO"
formats the word HELLO to bold and size 14

However, instead of HELLO, I need to put in a variable
which represents a date.
If anyone can help I'd be very grateful

Many thanks
Geoff



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default formatting headers


This puts in a date with the format you specify, but it should be run before
each print:

With ActiveSheet.PageSetup
.LeftFooter = "&""Arial,Bold""&14" & Format(Date, "mmm dd, yyyy")
End With


this uses the special date character so the date it updated automatically
with the short date format:

With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""&14&D"
End With

--
Regards,
Tom Ogilvy



need-A-hand wrote in message
...
Hello,
I wonder if you can help me

I know how to format a string within a header

eg:
sheet1.pagesetup.centerheader="&""ariel,bold"&""&1 4HELLO"
formats the word HELLO to bold and size 14

However, instead of HELLO, I need to put in a variable
which represents a date.
If anyone can help I'd be very grateful

Many thanks
Geoff



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
Copy formatting (headers, margins, etc) to another sheet? MQS Excel Discussion (Misc queries) 3 December 28th 09 05:15 AM
lookup using column headers and row headers Memphus01 Excel Discussion (Misc queries) 1 April 13th 09 04:57 PM
Formatting Headers & Footers Sonia Excel Discussion (Misc queries) 0 June 10th 08 04:15 PM
Problem formatting pivot table headers Goalie35 Excel Worksheet Functions 3 May 24th 07 10:41 PM
Headers/Footers Formatting Ross Payne Excel Discussion (Misc queries) 1 December 14th 06 03:35 PM


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