Prev: Parsing thru columns to find the last number
Next: transfer data range from criteria in 2 combo boxes
From: Michelle on 5 May 2010 12:25 Hello, I need to have 3 lines in my footer, with different font formats on each line so the top line is built from a string, and is Arial 12 Pt Bold The next line is a different string and should be 22pt Calibli And finally the last line is a third string and Times New Roman 8pt The strings will be different lenths on different occasions but wil always be on seperate lines. Does anyone know how to do this with code? Thanks M
From: Bob Umlas, Excel MVP on 5 May 2010 14:55 Sub RecordedMacro() ActiveSheet.PageSetup.RightFooter = _ "&""-,Italic""&20" & Chr(10) & "&""Arial,Bold""&12Line1&""-,Regular""&11" & Chr(10) & "&22line2&11" & Chr(10) & "&""Times New Roman,Bold""&8line3" End Sub "Michelle" wrote: > Hello, I need to have 3 lines in my footer, with different font formats on > each line > so the top line is built from a string, and is Arial 12 Pt Bold > The next line is a different string and should be 22pt Calibli > And finally the last line is a third string and Times New Roman 8pt > > The strings will be different lenths on different occasions but wil always > be on seperate lines. > > Does anyone know how to do this with code? > > Thanks > > M >
From: Michelle on 6 May 2010 02:09
That's great, it's similar to what I get when I record it, but I have to be able to concatenate strings in with it and I dont understand how the quotes work. Thanks M "Bob Umlas, Excel MVP" <BobUmlasExcelMVP(a)discussions.microsoft.com> wrote in message news:174A6EDE-291A-40E9-AF34-5FB7D9938665(a)microsoft.com... > Sub RecordedMacro() > ActiveSheet.PageSetup.RightFooter = _ > "&""-,Italic""&20" & Chr(10) & > "&""Arial,Bold""&12Line1&""-,Regular""&11" & Chr(10) & "&22line2&11" & > Chr(10) & "&""Times New Roman,Bold""&8line3" > End Sub > > "Michelle" wrote: > >> Hello, I need to have 3 lines in my footer, with different font formats >> on >> each line >> so the top line is built from a string, and is Arial 12 Pt Bold >> The next line is a different string and should be 22pt Calibli >> And finally the last line is a third string and Times New Roman 8pt >> >> The strings will be different lenths on different occasions but wil >> always >> be on seperate lines. >> >> Does anyone know how to do this with code? >> >> Thanks >> >> M >> |