Vb

dsait

Member
Join Date
Dec 2016
Location
edmonton
Posts
17
I am wondering if there are some gurus with vb that could help me with some code. I am trying to manipulate some trends with buttons. First I would like to change the trend start time in the amount of the time span. I tried it but the time span is in seconds and the start time is in datetime.

this is what I tried.
trend.xaxis.startime = (trend.xaxis.startime - trend.xaxis.timespan)

Would also like to inc/dec the time span but have not looked at this.

thanks
 
AustralIan thanks for putting me on the right track. This is what worked for me. I have several trends on the same page that require to be panned at the same time. This pans 150 minutes.

Code:
Private Sub Pan_Older_Released()

On Error Resume Next

Dim Date2 as Date, FirstDate As Date, IntervalType As String, Number As Integer

IntervalType = "n"    ' "N" specifies minutes interval.
FirstDate = Time.XAxis.StartTime
Number = -150
DATE2 = DateAdd(IntervalType, Number, FirstDate)

L2Diverter.Scroll = False

L2Diverter.XAxis.SetStartTimeAndSpan DATE2,0, 0, 0, 150, 0, 0

End Sub
 
Back
Top Bottom