Kaup, Chester
Chester_Kaup at kindermorgan.com
Wed Nov 10 13:31:50 CST 2010
I have a chart on a form. I run the following code on the On_Enter event of the chart to change the X axis of the chart and refresh the chart. The chart does not refresh unless I close the form and reopen it. What am I doing wrong?
Private Sub chtPlantChart_Enter()
Dim GraphApp As Graph.Application
Dim GraphObj As Graph.Chart
Dim XMin As Single
Set GraphObj = Me!chtPlantChart.Object
GraphObj.Axes(1).MinimumScaleIsAuto = True
XMin = GraphObj.Axes(1).MinimumScale
GraphObj.Axes(1).MinimumScale = XMin + 1
Me!chtPlantChart.SetFocus
GraphObj.Refresh
GraphObj.Application.Update
Me.Repaint
End Sub
Chester Kaup
Engineering Technician
Kinder Morgan CO2 Company, LLP
Office (432) 688-3797
FAX (432) 688-3799
No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.