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

Using Excel 2000.
1) I cut and paste data into an Excel spreadsheet.
2) There is a value in Cell D1.
3) I want to run a Macro, which will rearrange all the data in this
spreadsheet.
4) I know how to do all of it except:
I want the value in cell D1 to be placed in the custom header, right
side.
How can this be done?

Thanks.
--
Richard
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Custom Header

Sub AddToHeader()
With Sheets("Sheet1")
.PageSetup.RightHeader = .Range("D1").Value
End With
End Sub
--
HTH...

Jim Thomlinson


"Richard" wrote:

Using Excel 2000.
1) I cut and paste data into an Excel spreadsheet.
2) There is a value in Cell D1.
3) I want to run a Macro, which will rearrange all the data in this
spreadsheet.
4) I know how to do all of it except:
I want the value in cell D1 to be placed in the custom header, right
side.
How can this be done?

Thanks.
--
Richard

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Custom Header

Thank you very much. Works 100%.
--
Richard


"Jim Thomlinson" wrote:

Sub AddToHeader()
With Sheets("Sheet1")
.PageSetup.RightHeader = .Range("D1").Value
End With
End Sub
--
HTH...

Jim Thomlinson


"Richard" wrote:

Using Excel 2000.
1) I cut and paste data into an Excel spreadsheet.
2) There is a value in Cell D1.
3) I want to run a Macro, which will rearrange all the data in this
spreadsheet.
4) I know how to do all of it except:
I want the value in cell D1 to be placed in the custom header, right
side.
How can this be done?

Thanks.
--
Richard

  #4   Report Post  
Posted to microsoft.public.excel.programming
ts1 ts1 is offline
external usenet poster
 
Posts: 6
Default Custom Header

Jim,

I am still new to macro programming and tried using your suggestion in the
Workbook_open event with no luck. Can you please provide a some additional
guidance in the following scenario.

I have a workbook with 3 worksheets. There is a value in cell B2 of Sheet1
that I want the custom header of all three worksheets to have. Any help would
be much appreciated.

Thanks,
Tom S

"Jim Thomlinson" wrote:

Sub AddToHeader()
With Sheets("Sheet1")
.PageSetup.RightHeader = .Range("D1").Value
End With
End Sub
--
HTH...

Jim Thomlinson


"Richard" wrote:

Using Excel 2000.
1) I cut and paste data into an Excel spreadsheet.
2) There is a value in Cell D1.
3) I want to run a Macro, which will rearrange all the data in this
spreadsheet.
4) I know how to do all of it except:
I want the value in cell D1 to be placed in the custom header, right
side.
How can this be done?

Thanks.
--
Richard

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Custom Header

This worked for me:

Private Sub Workbook_Open()
Dim i As Integer
For i = 1 To 3
With Sheets(i)
.PageSetup.RightHeader = Sheets("Sheet1").Range("B2").Value
End With
Next i
End Sub

Hope this helps
Rowan

ts1 wrote:
Jim,

I am still new to macro programming and tried using your suggestion in the
Workbook_open event with no luck. Can you please provide a some additional
guidance in the following scenario.

I have a workbook with 3 worksheets. There is a value in cell B2 of Sheet1
that I want the custom header of all three worksheets to have. Any help would
be much appreciated.

Thanks,
Tom S

"Jim Thomlinson" wrote:


Sub AddToHeader()
With Sheets("Sheet1")
.PageSetup.RightHeader = .Range("D1").Value
End With
End Sub
--
HTH...

Jim Thomlinson

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
Custom header Carmel Setting up and Configuration of Excel 1 November 29th 05 05:58 PM
Can you link a custom property to an Excel custom header text? LouErc Setting up and Configuration of Excel 0 November 8th 05 04:58 PM
Excel: custom header - is it possible to paste into header? Maureen D. Excel Worksheet Functions 0 November 4th 05 03:07 PM
how do I permanetly add custom header to excel header list? GARY Excel Discussion (Misc queries) 1 December 15th 04 08:52 PM
Custom Header Josh O. Excel Discussion (Misc queries) 1 December 1st 04 06:56 PM


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

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"