Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Coding for custom footer

I am trying to put 1 of 4 footers into the center footnote via a macro. Which
footer that goes in depends on the scenario selected by the end user.

The longest of the 4 footnotes is 198 characters. The left footnote is 56
characters. The right footnote is today's date and should have a maximum
length of 10 characters.

So the sum of all of these never exceeds the 255 mark.

Yet I get an error message "Runtime 1004. Unable to set the CenterFooter
property in Page Setup" on 3 of the 4 footnotes.

If need be, how do you paste or insert one of four pictures in the
CenterFootnote?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Coding for custom footer

Sub Macro1()
Dim s As String
s = Cells(1, 1).Value
ActiveSheet.PageSetup.CenterFooter = s
End Sub

will set the centerfooter to some text string

If you want a picture in the centerfooter then

ActiveSheet.PageSetup.CentertFooterPicture.FileNam e = "C:\pic.jpg"
or some other text string specifying the file


--
Gary''s Student


"cakprogramming" wrote:

I am trying to put 1 of 4 footers into the center footnote via a macro. Which
footer that goes in depends on the scenario selected by the end user.

The longest of the 4 footnotes is 198 characters. The left footnote is 56
characters. The right footnote is today's date and should have a maximum
length of 10 characters.

So the sum of all of these never exceeds the 255 mark.

Yet I get an error message "Runtime 1004. Unable to set the CenterFooter
property in Page Setup" on 3 of the 4 footnotes.

If need be, how do you paste or insert one of four pictures in the
CenterFootnote?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Coding for custom footer

198+56+10=264

Mike F
"cakprogramming" wrote in message
...
I am trying to put 1 of 4 footers into the center footnote via a macro.
Which
footer that goes in depends on the scenario selected by the end user.

The longest of the 4 footnotes is 198 characters. The left footnote is 56
characters. The right footnote is today's date and should have a maximum
length of 10 characters.

So the sum of all of these never exceeds the 255 mark.

Yet I get an error message "Runtime 1004. Unable to set the CenterFooter
property in Page Setup" on 3 of the 4 footnotes.

If need be, how do you paste or insert one of four pictures in the
CenterFootnote?



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
Coding Custom Date Functions in Excel [email protected] Excel Worksheet Functions 1 May 8th 09 10:01 AM
coding for footer,help please kathy Excel Programming 1 March 15th 06 02:26 AM
color coding custom number formats bob sacco Excel Discussion (Misc queries) 1 October 3rd 05 01:01 PM
color coding custom number formats bob sacco Excel Discussion (Misc queries) 2 October 3rd 05 11:58 AM
Custom Form Coding KaW Excel Programming 4 April 30th 05 03:16 AM


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