Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom header | Setting up and Configuration of Excel | |||
Can you link a custom property to an Excel custom header text? | Setting up and Configuration of Excel | |||
Excel: custom header - is it possible to paste into header? | Excel Worksheet Functions | |||
how do I permanetly add custom header to excel header list? | Excel Discussion (Misc queries) | |||
Custom Header | Excel Discussion (Misc queries) |