Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ajd ajd is offline
external usenet poster
 
Posts: 16
Default changing font type in a footer

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default changing font type in a footer

..CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value



ajd wrote:

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
ajd ajd is offline
external usenet poster
 
Posts: 16
Default changing font type in a footer

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.

"Dave Peterson" wrote:

..CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value



ajd wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default changing font type in a footer

Jim Rech and Nick Osdale-Popa posted this that might help get the zoom factor.
http://groups.google.com/groups?thre...%40tkmsftngp05

Good luck,


ajd wrote:

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.

"Dave Peterson" wrote:

..CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value



ajd wrote:

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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
ajd ajd is offline
external usenet poster
 
Posts: 16
Default changing font type in a footer

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.

"Dave Peterson" wrote:

Jim Rech and Nick Osdale-Popa posted this that might help get the zoom factor.
http://groups.google.com/groups?thre...%40tkmsftngp05

Good luck,


ajd wrote:

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.

"Dave Peterson" wrote:

..CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value



ajd wrote:

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


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default changing font type in a footer

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.



ajd wrote:

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.

"Dave Peterson" wrote:

Jim Rech and Nick Osdale-Popa posted this that might help get the zoom factor.
http://groups.google.com/groups?thre...%40tkmsftngp05

Good luck,


ajd wrote:

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.

"Dave Peterson" wrote:

..CenterFooter = "&""Times New Roman,Italic""" & wksht.Range("f1").Value



ajd wrote:

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


--

Dave Peterson


--

Dave Peterson
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
Footer font formating in Excel Brian Barbre[_2_] Excel Programming 6 December 1st 08 06:45 PM
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
Different font in footer on first worksheet than the others watchtower83 Excel Discussion (Misc queries) 6 January 2nd 07 08:31 PM
Colour of font in header/footer Gilbert De Ceulaer New Users to Excel 1 March 19th 06 02:04 PM
Dropdown list for font size, font type and number formats ExcelMonkey[_190_] Excel Programming 1 March 9th 05 03:50 PM


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