Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I loop through workbook and rename all chart titles?
I have a workbook with about 45 worksheets, each of which have 2
charts. When the workbook is opened I get a 4 character code from th user via an InputBox. I'd like to take this code and prefix ever chart title in the workbook with it. Could someone post an example of the VBA code that I'd use t dynamically loop through every worksheet/chart and append this to th existing chart titles? Thanks a lot. I'm familiar with VB but not familiar enough with Exce objects to get this done in time. BackPaddle -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I loop through workbook and rename all chart titles?
Here is the quick and dirty solution. I'm sure you can clean this up
bit, though. - Pikus p = "PREF" sheetCount = 45 For x = 1 To sheetCount With Worksheets(x) c = .ChartObjects.Count For y = 1 To c .ChartObjects(y).Chart.ChartTitle.Text = _ p & .ChartObjects(y).Chart.ChartTitle.Text Next y End With Next -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change multiple Chart Titles in different sheets in the same Workbook | Excel Worksheet Functions | |||
How to open a new workbook and rename the workbook? | Excel Discussion (Misc queries) | |||
Chart Titles not showing in excel chart | Excel Discussion (Misc queries) | |||
Chart Titles not showing in excel chart Window | Excel Discussion (Misc queries) | |||
Workbook, worksheet rename | Excel Programming |