98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » advanced excel course london - Naming Charts Created by a Macro
advanced excel course london - Naming Charts Created by a Macro
Resolved · Low Priority · Version Standard
Zohra has attended:
Excel Advanced course
Excel Intermediate course
Excel VBA Intro Intermediate course
Naming Charts Created by a Macro
Hello,
I've set up a macro to create a couple of charts. I'd like the end of the macro to resize the graphs and have done this by recording another macro. However, I can't seem to get the end to refer to the right chart object- is there a way of naming the chart so that I can use
ActiveSheet.Shapes("Chart Name").IncrementTop XX
?
RE: Naming Charts Created by a Macro
Adding in an example of where it goe swrong:
ActiveChart.Name = "Chart 13"
'at this point the chart is named "Chart 13"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
'at this point it changes and the next line produces an error
ActiveChart.Name = "Chart 13"
RE: Naming Charts Created by a Macro
Zohra
i think that you may need to reselect the chart ie
use Charts("Chart 13").Select
instead of the line ActiveChart.Name = "Chart 13".
If that doesn't work you could send the spreadsheet where the error occurs to
info AT stl-training.co.uk and mark it to the attention of Carlos
I'll have a look at how the code is working and hopefully come up with an answer.
Regards
Carlos
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Transpose textYou can transpose any range of cells, turning the columns into rows and the rows into columns. Just follow these steps: |