Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Same Footer, but different page setup options

Is there any way to force all pages of a spreadsheet to
have the same Footer without affecting the other "page set
up" options? Selecting all sheets and adding the footer
changes all sheets to the same settings otherwise.
Perhaps this could be done in VB? Thank you
Kristie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Same Footer, but different page setup options

Kristie --


Sub EditPageFooter()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = "Hello World"

Next ws

End Sub


-----

Hope it Helps,

- Rodney POWELL
Microsoft MVP - Excel

Beyond Technology
Spring, Texas USA
www.BeyondTechnology.com



"Kristie" wrote in message ...
Is there any way to force all pages of a spreadsheet to
have the same Footer without affecting the other "page set
up" options? Selecting all sheets and adding the footer
changes all sheets to the same settings otherwise.
Perhaps this could be done in VB? Thank you
Kristie
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Same Footer, but different page setup options

Is it possible for the user to be prompted to enter the
text to be included for all sheets - or can this macro
pull data from a specified field within the spreadsheet? I
tried using = Sheet1!A2 for example and got an error. I
might even want to pull the data from another file - how
can I specify the file name, sheet name, and cell within
the code instead of using quotes and entering the data in
the macro? Thank you!
-----Original Message-----
Kristie --


Sub EditPageFooter()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = "Hello World"

Next ws

End Sub


-----

Hope it Helps,

- Rodney POWELL
Microsoft MVP - Excel

Beyond Technology
Spring, Texas USA
www.BeyondTechnology.com



"Kristie" wrote in message

...
Is there any way to force all pages of a spreadsheet to
have the same Footer without affecting the other "page

set
up" options? Selecting all sheets and adding the footer
changes all sheets to the same settings otherwise.
Perhaps this could be done in VB? Thank you
Kristie

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Same Footer, but different page setup options

Sub EditPageFooter()

Dim ws As Worksheet
dim rng as Range
' Mydata.xls must be open
set rng = Workbooks("MyData.xls").Worksheets("Sheet3") _
.Range("B9").Value
For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = rng.Value

Next ws

End Sub

--
Regards,
Tom Ogilvy

"kristie" wrote in message
...
Is it possible for the user to be prompted to enter the
text to be included for all sheets - or can this macro
pull data from a specified field within the spreadsheet? I
tried using = Sheet1!A2 for example and got an error. I
might even want to pull the data from another file - how
can I specify the file name, sheet name, and cell within
the code instead of using quotes and entering the data in
the macro? Thank you!
-----Original Message-----
Kristie --


Sub EditPageFooter()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = "Hello World"

Next ws

End Sub


-----

Hope it Helps,

- Rodney POWELL
Microsoft MVP - Excel

Beyond Technology
Spring, Texas USA
www.BeyondTechnology.com



"Kristie" wrote in message

...
Is there any way to force all pages of a spreadsheet to
have the same Footer without affecting the other "page

set
up" options? Selecting all sheets and adding the footer
changes all sheets to the same settings otherwise.
Perhaps this could be done in VB? Thank you
Kristie



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Same Footer, but different page setup options

When I do this I get runtime error 424 - Required object.
Am I supposed to do anything to this code (besides edit
the name of the file and select the cell I am referring
to. Are there any other edits I need to make to make this
usable. Thank you so much!!
-----Original Message-----
Sub EditPageFooter()

Dim ws As Worksheet
dim rng as Range
' Mydata.xls must be open
set rng = Workbooks("MyData.xls").Worksheets("Sheet3")

_
.Range("B9").Value
For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = rng.Value

Next ws

End Sub

--
Regards,
Tom Ogilvy

"kristie" wrote in message
...
Is it possible for the user to be prompted to enter the
text to be included for all sheets - or can this macro
pull data from a specified field within the

spreadsheet? I
tried using = Sheet1!A2 for example and got an error. I
might even want to pull the data from another file - how
can I specify the file name, sheet name, and cell within
the code instead of using quotes and entering the data

in
the macro? Thank you!
-----Original Message-----
Kristie --


Sub EditPageFooter()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = "Hello World"

Next ws

End Sub


-----

Hope it Helps,

- Rodney POWELL
Microsoft MVP - Excel

Beyond Technology
Spring, Texas USA
www.BeyondTechnology.com



"Kristie" wrote in message

...
Is there any way to force all pages of a spreadsheet to
have the same Footer without affecting the other "page

set
up" options? Selecting all sheets and adding the

footer
changes all sheets to the same settings otherwise.
Perhaps this could be done in VB? Thank you
Kristie



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Same Footer, but different page setup options

Had a typo - there should be no value on the end of Range("B9")

Sub EditPageFooter()

Dim ws As Worksheet
Dim rng As Range
' Mydata.xls must be open
Set rng = Workbooks("MyData.xls").Worksheets("Sheet3") _
.Range("B9")
For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = rng.Value

Next ws

End Sub

worked for me.

--
Regards,
Tom Ogilvy

wrote in message
...
When I do this I get runtime error 424 - Required object.
Am I supposed to do anything to this code (besides edit
the name of the file and select the cell I am referring
to. Are there any other edits I need to make to make this
usable. Thank you so much!!
-----Original Message-----
Sub EditPageFooter()

Dim ws As Worksheet
dim rng as Range
' Mydata.xls must be open
set rng = Workbooks("MyData.xls").Worksheets("Sheet3")

_
.Range("B9").Value
For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = rng.Value

Next ws

End Sub

--
Regards,
Tom Ogilvy

"kristie" wrote in message
...
Is it possible for the user to be prompted to enter the
text to be included for all sheets - or can this macro
pull data from a specified field within the

spreadsheet? I
tried using = Sheet1!A2 for example and got an error. I
might even want to pull the data from another file - how
can I specify the file name, sheet name, and cell within
the code instead of using quotes and entering the data

in
the macro? Thank you!
-----Original Message-----
Kristie --


Sub EditPageFooter()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

ws.PageSetup.LeftFooter = "Hello World"

Next ws

End Sub


-----

Hope it Helps,

- Rodney POWELL
Microsoft MVP - Excel

Beyond Technology
Spring, Texas USA
www.BeyondTechnology.com



"Kristie" wrote in message
...
Is there any way to force all pages of a spreadsheet to
have the same Footer without affecting the other "page
set
up" options? Selecting all sheets and adding the

footer
changes all sheets to the same settings otherwise.
Perhaps this could be done in VB? Thank you
Kristie



.



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
paper size options in page setup razorback Excel Discussion (Misc queries) 5 March 23rd 10 08:29 PM
page setup, header/footer just peachy Excel Discussion (Misc queries) 0 April 2nd 09 05:05 PM
copy footer without copying page setup jen_writer Excel Discussion (Misc queries) 2 December 4th 07 06:18 PM
page setup landscape, but print footer in portrait mode tbrown Excel Discussion (Misc queries) 0 October 22nd 07 11:01 PM
Page setup - footer nsv Excel Discussion (Misc queries) 0 February 7th 06 10:58 AM


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