View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GJones GJones is offline
external usenet poster
 
Posts: 132
Default Visual Basic Question

Craig;

Here ya go;

Sub PageNumber()
ActiveSheet.PageSetup.CenterFooter = InputBox
("Enterpage Number")
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "&""Arial Black,Bold""&11 44"
.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
End Sub





-----Original Message-----
I have several worksheets that I need to inset the page
number into the center footer. I would use the &page
number but my page numbers are in the format of "1-1, 1-

2,
1-3, etc." Excel does not allow this so I am trying to
write a macro that asks me the page number and inserts it
into the center footer position. I have that part of the
macro written but I cannot format the font, size and
boldness of the page number. Can anyone give me a hand.
Here is the macro I have currently tried and I want it to
appear Arial Font size 4, and Bolded.


Sub PageNumber()
ActiveSheet.PageSetup.CenterFooter = InputBox("Enter
page Number")

End Sub

Any ideas or suggestions would be greatly appreciated.
Thanks in adance.
.