Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Text from within a sheet into right header


Howdie,

How do I put text from say cell c10 into the right header by using
VB...?

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Text from within a sheet into right header

Activesheet.PageSetup.RightHeader = Activesheet.Range("C10").Text

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote:


Howdie,

How do I put text from say cell c10 into the right header by using
VB...?

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Text from within a sheet into right header

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightHeader = Cells(10, 3).Value
End Sub

Paste this into ThisWorkbook code, not a standard module
--
Gary's Student


"Darin Kramer" wrote:


Howdie,

How do I put text from say cell c10 into the right header by using
VB...?

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Text from within a sheet into right header

Hi

according Excel VBA help by simply searching Header
RightHeader Property
See Also Applies To Example Specifics
Returns or sets the right part of the header. Read/write String.

Remarks
Special format codes can be used in the header text.

Example
This example prints the filename in the upper-right corner of every page.

Worksheets("Sheet1").PageSetup.RightHeader = "&F"So
Worksheets("Sheet1").PageSetup.RightHeader =
Worksheets("Sheet1").Range("C10")Regards"Darin Kramer"
wrote in message
...

Howdie,

How do I put text from say cell c10 into the right header by using
VB...?

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***



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
identify sheet number in header? Steve Excel Discussion (Misc queries) 5 December 9th 08 12:29 AM
can't get sheet to display after editing header Jas New Users to Excel 0 March 31st 08 05:10 PM
VBA Code to Add the same header from my first sheet into 20 sheets [email protected] Excel Worksheet Functions 4 December 15th 06 02:13 AM
Macro with a different Header for each Sheet Dragos Excel Discussion (Misc queries) 2 September 15th 05 07:32 AM
How do I create a new header in Excel once to be used on all sheet thechuckster51 Setting up and Configuration of Excel 0 June 1st 05 12:21 AM


All times are GMT +1. The time now is 04:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"