Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

changing font type in a footer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ajd - 05 Jan 2006 22:04 GMT
I found VBA code that would place a cell's contents into the footer:

    With wkSht.PageSetup
        .CenterFooter = wkSht.Range("F1").Value
    End With

I also need to change the font type to Times New Roman, Italic.  I tried
"&""Times New Roman,Italic" both before and after the above command on its
own line and on the same line, but it either has no effect or prevents the
footnote from showing up.  What code do I use to change the font type along
with the above code?  Thanks.
Dave Peterson - 05 Jan 2006 23:04 GMT
.CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value

> I found VBA code that would place a cell's contents into the footer:
>
[quoted text clipped - 7 lines]
> footnote from showing up.  What code do I use to change the font type along
> with the above code?  Thanks.

Signature

Dave Peterson

ajd - 17 Jan 2006 18:09 GMT
Thanks.  Now I'm also trying to control the font size.  I want the font size
of the footer to be the same on several different worksheets, all zoomed to
different sizes, since they are set to 1 page by 1 page with differing
numbers and sizes of rows and columns.  I tried to set the footer to a given
size and then adjust the footer size based on the zoom, but even using a font
size of 1 for some reason yields text that is too large.

Is there a way to get a font size smaller than one, or better yet, what code
would I use to determine the zoom percentage and then standardize my footer
text size?

Thanks your help.

> ..CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value
>
[quoted text clipped - 9 lines]
> > footnote from showing up.  What code do I use to change the font type along
> > with the above code?  Thanks.
Dave Peterson - 17 Jan 2006 19:09 GMT
Jim Rech and Nick Osdale-Popa posted this that might help get the zoom factor.
http://groups.google.com/groups?threadm=ejuo3kjsAHA.2344%40tkmsftngp05

Good luck,

> Thanks.  Now I'm also trying to control the font size.  I want the font size
> of the footer to be the same on several different worksheets, all zoomed to
[quoted text clipped - 26 lines]
> >
> > Dave Peterson

Signature

Dave Peterson

ajd - 24 Jan 2006 22:47 GMT
I took a look at that post and incorporated it into my code, but I'm still
getting a 0 for the zoom factor.  I'm not familiar with SendKeys, so I'm not
sure what that's doing, but it's clearly returning 0 since it's set to fit to
x pages wide by x pages tall.

Could you please help out?  Thanks.

> Jim Rech and Nick Osdale-Popa posted this that might help get the zoom factor.
> http://groups.google.com/groups?threadm=ejuo3kjsAHA.2344%40tkmsftngp05
[quoted text clipped - 31 lines]
> > >
> > > Dave Peterson
Dave Peterson - 25 Jan 2006 00:40 GMT
The first sendkeys sends commands (%C = Alt-C) to close the print preview
window.

   SendKeys "%C"
   ActiveSheet.PrintPreview

The second sends P-alt-A-enter.  (Select the Page tab, then the Adjust to
section, then hits enter to leave the dialog.

   'to get/set the Zoom %, initiate the Page Setup Dialog box.
   SendKeys "P%A~"
   Application.Dialogs(xlDialogPageSetup).Show

I don't see how it could be returning 0.

> I took a look at that post and incorporated it into my code, but I'm still
> getting a 0 for the zoom factor.  I'm not familiar with SendKeys, so I'm not
[quoted text clipped - 42 lines]
> >
> > Dave Peterson

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.