Sam, Thank you for your reply. I will have to think through what is important to duplicate in a workbook to get the error message. I cannot send the original as it has business confidential information in it.
I have a worksheet with a Pivot Table in it. On the same worksheet I have a spreadsheet region not related to the Pivot Table. I also have a chart whose data is from the spreadsheet (not a Pivot Chart). It is this chart that I cannot format the text size on. I get the error: Method 'TextFrame2" of object 'ChartFormat' failed. I don't have time to get back to this issue until later this week. I'll attach an example at that time. Dan On Friday, September 11, 2015 at 11:50:08 AM UTC-4, Sam Mathai Chacko wrote: > Dan, can you attach a sample file with just one chart and the code.... > > On Fri, Sep 11, 2015 at 8:25 PM, Dan McDonald <mcdon...@gmail.com > <javascript:>> wrote: > >> I have an unexpected problem trying to do something simple. I merely want >> to change the font size of Axis(XlValue) on an embedded chart. >> >> My VBA code (from record macro) is shown below with the offending line >> pointed to. >> >> ActiveSheet.ChartObjects("Chart 6").Activate >> ActiveChart.Axes(xlValue).Select >> With Selection.Format.TextFrame2.TextRange.Font <<<<<<< >> .BaselineOffset = 0 >> .Size = 14 >> End With >> ActiveChart.Axes(xlCategory).Select >> ActiveChart.ChartArea.Select >> With ActiveSheet.Shapes("Chart 6").TextFrame2.TextRange.Font >> .BaselineOffset = 0 >> .Size = 12 >> End With >> >> I get the following error message: >> >> Run-time error '-2147467259(80004005)' >> Method 'TextFrame2" of object 'ChartFormat' failed >> >> I suspect it is a problem with needing to make a code modification for an >> embedded chart but I am not sure. >> >> Can anyone help me out? >> >> Thank you, >> >> Dan >> >> -- >> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s >> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >> https://www.facebook.com/discussexcel >> >> FORUM RULES >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> 2) Don't post a question in the thread of another member. >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> 4) Acknowledge the responses you receive, good or bad. >> 5) Jobs posting is not allowed. >> 6) Sharing copyrighted material and their links is not allowed. >> >> NOTE : Don't ever post confidential data in a workbook. Forum owners and >> members are not responsible for any loss. >> --- >> You received this message because you are subscribed to the Google Groups >> "MS EXCEL AND VBA MACROS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to excel-macros...@googlegroups.com <javascript:>. >> To post to this group, send email to excel-...@googlegroups.com >> <javascript:>. >> Visit this group at http://groups.google.com/group/excel-macros. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Sam Mathai Chacko > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.