C
Charles
Hi All,
I am using PivotChart to display data. You know PivotChart's
formatting will change, so I tried to create class/event to keep this
formatting. The problem is, will the following method worked perfected
in Excel along, when I put the same Excel file online (IE 6.0), it
doesn't work properly - seems give me random result. Could you guys
give me any hint/suggestions?
Any suggestion would be highly appreciate !
I am using Windows 2000 and MS Excel 2000 with SP 3, IE 6.0
In my Excel project
1) I created a MsgClass
Public WithEvents MsgChart As Chart
Private Sub MsgChart_Calculate()
Dim Sers As SeriesCollection
Dim Ser1 As Series
Dim Dlb As DataLabel
Dim k As Integer
Application.ScreenUpdating = False
Set Sers = MsgChart.SeriesCollection
Set Ser1 = Sers.Item(1)
With Ser1
For k = 1 To .Points.Count
Set Dlb = .Points(k).DataLabel
Dlb.Position = xlLabelPositionCenter
Dlb.Font.ColorIndex = 6
Dlb.Font.Bold = True
Dlb.Interior.ColorIndex = 1
Next k
.Interior.ColorIndex = 10
End With
Application.ScreenUpdating = True
End Sub
2)In Modules
Dim MChart As MsgClass
Sub Set_MChart()
Set MChart.MsgChart = Thisworkbook.Charts("MY Charts")
End Sub
Sub IfClickThen_Act()
'If click this chart's picture then active this chart
Thisworkbook.Charts("MY Charts").Activate
End Sub
3)When workbook Open
Private Sub Workbook_Open()
Set_MChart
Thisworkbook.Charts("Summary Chart Page").Activate
End Sub
I am using PivotChart to display data. You know PivotChart's
formatting will change, so I tried to create class/event to keep this
formatting. The problem is, will the following method worked perfected
in Excel along, when I put the same Excel file online (IE 6.0), it
doesn't work properly - seems give me random result. Could you guys
give me any hint/suggestions?
Any suggestion would be highly appreciate !
I am using Windows 2000 and MS Excel 2000 with SP 3, IE 6.0
In my Excel project
1) I created a MsgClass
Public WithEvents MsgChart As Chart
Private Sub MsgChart_Calculate()
Dim Sers As SeriesCollection
Dim Ser1 As Series
Dim Dlb As DataLabel
Dim k As Integer
Application.ScreenUpdating = False
Set Sers = MsgChart.SeriesCollection
Set Ser1 = Sers.Item(1)
With Ser1
For k = 1 To .Points.Count
Set Dlb = .Points(k).DataLabel
Dlb.Position = xlLabelPositionCenter
Dlb.Font.ColorIndex = 6
Dlb.Font.Bold = True
Dlb.Interior.ColorIndex = 1
Next k
.Interior.ColorIndex = 10
End With
Application.ScreenUpdating = True
End Sub
2)In Modules
Dim MChart As MsgClass
Sub Set_MChart()
Set MChart.MsgChart = Thisworkbook.Charts("MY Charts")
End Sub
Sub IfClickThen_Act()
'If click this chart's picture then active this chart
Thisworkbook.Charts("MY Charts").Activate
End Sub
3)When workbook Open
Private Sub Workbook_Open()
Set_MChart
Thisworkbook.Charts("Summary Chart Page").Activate
End Sub