Microsoft Excel
--
Questions
--
Followers
Top Experts
VBA - Change font size during string
Hi Guys,
I have a chart title which I neet to change the font size for the 2nd line in the title so the first line appears in a large font and the 2nd line which will be a date appears in a smaller font. I have the code below which puts the correct text on both lines but I'm unsure how to change the font size for the 2nd line. Any ideas would be very appreaciated
ActiveChart.ChartTitle.Tex t = "Quality Gates - September" & Chr(10) & "From: " & Format(now(),"dd/mm/yyy")
Thanks
Gavin
I have a chart title which I neet to change the font size for the 2nd line in the title so the first line appears in a large font and the 2nd line which will be a date appears in a smaller font. I have the code below which puts the correct text on both lines but I'm unsure how to change the font size for the 2nd line. Any ideas would be very appreaciated
ActiveChart.ChartTitle.Tex
Thanks
Gavin
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
You can't have more than one font size, color etc in a textbox. If Excel has a richtextbox you can use that but you should probably consider using two textboxes and splitting the text between the two.
Thanks for the reply. I'm al little confused though. If I create a chart manually with two lines of text in the title I can highlight the 2nd line of text and change the font size to whatever I want so that the size differs from the first line. I was hoping there was a way to replicate this action using VBA
Try creating and then editing a macro while you are achieving the effect that you want.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Microsoft Excel
--
Questions
--
Followers
Top Experts
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.