![]() |
use vba to write vba for a chart sheet created on the fly
How do I write vba using vba for a chart sheet I have just created on
the fly? I 've noticed excel gives the vbcomponent a different name to the chart name which makes it difficult to select the correct vbproject Thanks |
use vba to write vba for a chart sheet created on the fly
Depends on how you create the chart sheet, but if with the Charts.Add method
then Dim NewChart as Chart Set NewChart = Workbooks("WorkbookName").Charts.Add() Now use the variable NewChart to refer to the chart object, or use its .Name property if you need that. -- - K Dales " wrote: How do I write vba using vba for a chart sheet I have just created on the fly? I 've noticed excel gives the vbcomponent a different name to the chart name which makes it difficult to select the correct vbproject Thanks |
All times are GMT +1. The time now is 05:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com