Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that lets the user first select a number of charts and then
when the user presses a button the charts sizes and color are eing changed. The problem is that it does not works if I only have one chart selected. When I have two or more it works fine. My code (relevant parts) is: Public Sub arrayLoop() Dim obj As Object Dim currentChart As Object For Each obj In Selection If TypeName(obj) = "ChartObject" Then Set currentChart = obj Call linjeDiagramKnapp(currentChart) End If Next End Sub In this sub I check the selection to see if the selected objects really are charts. I assume that there is something wrong here on the first line of the For-loop, but I do not know how it should be or if the problem might be elsewhere. Any help appreciated! Thanks alot! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object Selection | Excel Discussion (Misc queries) | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
Object Type of a selection... counting rows in a selection | Excel Programming | |||
Selection object in Excel 2002 | Excel Programming | |||
Method selection of object _Global falied | Excel Programming |