A
Arne Hegefors
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!
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!