|
-
Apr 24th, 2004, 02:56 PM
#1
Thread Starter
Lively Member
my crayons don't work! (RESOLVED)
Anyone know how to change the font color on the page headings in a multipage in Excel?
I can change the caption, but can't seem to find a color property for the text.
Seems to work with a tabstrip, anyone know if this exists for a multipage?
Last edited by TheFIDDLER; Apr 25th, 2004 at 05:57 PM.
-----
#VBA, VB 6 Professional Edition, Office XP Developper. Excel 97, Excel 2000, Excel XP
I miss my VIC 20.
Never should have upgraded to my commodore 64. ...
-
Apr 24th, 2004, 04:04 PM
#2
Your talking about the Page Header in the page setup dialogue?
There is no access to the font color for page headers/footers.
This is all that is available - again I am on 2003 so if you don't
have these in Excel 97 then I don't know.
Code:
Format code - Description
&L = Left aligns the characters that follow.
&C = Centers the characters that follow.
&R = Right aligns the characters that follow.
&E = Turns double-underline printing on or off.
&X = Turns superscript printing on or off.
&Y = Turns subscript printing on or off.
&B = Turns bold printing on or off.
&I = Turns italic printing on or off.
&U = Turns underline printing on or off.
&S = Turns strikethrough printing on or off.
&D = Prints the current date.
&T = Prints the current time.
&F = Prints the name of the document.
&A = Prints the name of the workbook tab.
&P = Prints the page number.
&P+ = number Prints the page number plus the specified number.
&P- = number Prints the page number minus the specified number.
&& = Prints a single ampersand.
& "fontname"= Prints the characters that follow in the specified
font. Be sure to include the double quotation marks.
&nn = Prints the characters that follow in the specified font size.
Use a two-digit number to specify a size in points.
&N = Prints the total number of pages in the document.
VB Code:
Sub FormatPageHeaderFooter()
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""&12Font color test"
'.LeftHeader = "&D" 'PRINTS CURRENT DATE
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Or maybe use a colored picture of text?
VB Code:
Sub InsertPicture()
With ActiveSheet.PageSetup.LeftHeaderPicture
.FileName = "C:\Sample.jpg"
.Height = 275.25
.Width = 463.5
.Brightness = 0.36
.ColorType = msoPictureGrayscale
.Contrast = 0.39
.CropBottom = -14.4
.CropLeft = -28.8
.CropRight = -14.4
.CropTop = 21.6
End With
' Enable the image to show up in the left header.
ActiveSheet.PageSetup.LeftHeader = "&G"
End Sub
Oh, just a thought, what about changing the
default color for all Excel and then color all your cells back to
black. This will leave the custom color on the page headers?
Guess it needs testing in 97.
HTH
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 25th, 2004, 07:51 AM
#3
Thread Starter
Lively Member
Thanks for the reply.
I was referring to a multipage control, found in the standard VBA control box for use in a form. It has tabs called Page 1, Page 2, Page 3, etc.. I can rename these tabs, but can't quite figure out how to set font colors.
-----
#VBA, VB 6 Professional Edition, Office XP Developper. Excel 97, Excel 2000, Excel XP
I miss my VIC 20.
Never should have upgraded to my commodore 64. ...
-
Apr 25th, 2004, 04:35 PM
#4
New Member
The multipage's forecolor property will change the text color. In order to change this property, make sure you have the multipage control selected and not a specific page within the control.
Unfortunately, this color will be used on every page.
Hope this helps.
-
Apr 25th, 2004, 05:56 PM
#5
Thread Starter
Lively Member
Thank you - did exactly what I was looking for.
-----
#VBA, VB 6 Professional Edition, Office XP Developper. Excel 97, Excel 2000, Excel XP
I miss my VIC 20.
Never should have upgraded to my commodore 64. ...
-
Apr 25th, 2004, 06:00 PM
#6
Thread Starter
Lively Member
You know, when you think about it, M$ should have worded their properties a bit better.
I would associate a Forecolor property with the actual color of the form, or the multistrip page within the form.
And I agree, you have to be very specific in only selecting the multistrip, and not a page within the multistrip.
Thanks again for the help.
-----
#VBA, VB 6 Professional Edition, Office XP Developper. Excel 97, Excel 2000, Excel XP
I miss my VIC 20.
Never should have upgraded to my commodore 64. ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|