View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Copy Contract Number to CenterFooter on multiple sheets

First off, your code is not a copy/paste even if it has some of the effects
of such. Think of it as what it is - programmatically setting the value of
one cell equal to another.

Your code also has nothing to do with setting a page footer, so that's a
little confusing. You would have to set them individually for each sheet
but that's easy in a loop.

Sub a()
Dim WS As Worksheet
For Each WS In Worksheets(Array("Sheet1", "Sheet2", "Sheet3"))
WS.PageSetup.CenterFooter = "abc"
Next
End Sub

--
Jim
"BEEJAY" wrote in message
...
| In part, I have the following that takes a Contract number generated in
| workbook called QCNUM and puts it in "active" Workbook, Sheet# 1 called
| "Contracts", Cell E4
|
| ' The following is "paste into"
| myBook.Worksheets("Contract").Range("E4").Value = _
| ' The following is "copy from"
| myQCNUM.Worksheets("Sheet2").Range("G6").Value
|
| (I don't know why the above has to be entered as shown - it seems
backwards
| to me, BUT, it Works.)
|
| Somehow, I need to have the Contract number inserted in the CentreFooter
of
| sheets: "Options", "Pricing", "Notes", Warranty_CDN", Warranty_USA"
| Is it neccessary to duplicate the above 2 lines (changing only sheet
name),
| for each of the required sheets? or is there a handy-dandy shorter process
| that can be used.
|
| Thanks in advance for any input..............
|
|