I'm working on some simple application that inserts charts based on data. Data I receive in a worksheet and graph is to be based on them. For some reason however my code (which works just fine in a test worksheet created by me) doesn't work (it breaks at the second line):
Dim ch As ChartObject
Set ch = ActiveSheet.ChartObjects.Add(100, 30, 400, 250)
I'm relatively new to Excel 2007 and I've noticed that on the insert tab in the test worksheet is is possible to insert graphs by pressing a button. However on the data I receive these icons are inactive grey. Does it really matter and well how can I make it work?
Thank you
Bookmarks