Kaup, Chester
Chester_Kaup at kindermorgan.com
Tue Aug 17 07:48:06 CDT 2010
I run the following code on the enter event of a chart on a form. The first time I open the form the chart is on nothing happens. I then close the form and reopen it. Then the code works as intended. Do I maybe need to put the code on a different event or on a form event rather than a chart event?
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.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.