For trend charts, I can use an ActiveX Calendar control to select a date on a trend using the following code where "Trend" is the name of the trend chart:
Private Sub Calendar1_Click()
Trend.Scroll = False
Trend.XAxis.SetStartTimeAndSpan Calendar1.Value, 0, 0, 0, 150, 0, 0
End Sub
It works great so long as the calendar control is on the same display page as the trend. However, I'd like to have a button on a trend page that would open a popup page that contained the calendar control. That way the calendar control can be big and doesn't take up space on the trend page. You'd open the popup, click the date you want and then close it. Or have it close itself. All trends would have buttons that open the same popup calendar control.
I assume I'd need the popup button to pass information to the popup page so that "Trend" in the above code can be replaced with something that refers to the trend on the separate page. I don't know how to do this. I'm a PLC guy, not a VBA guy. Any help would be greatly appreciated
Private Sub Calendar1_Click()
Trend.Scroll = False
Trend.XAxis.SetStartTimeAndSpan Calendar1.Value, 0, 0, 0, 150, 0, 0
End Sub
It works great so long as the calendar control is on the same display page as the trend. However, I'd like to have a button on a trend page that would open a popup page that contained the calendar control. That way the calendar control can be big and doesn't take up space on the trend page. You'd open the popup, click the date you want and then close it. Or have it close itself. All trends would have buttons that open the same popup calendar control.
I assume I'd need the popup button to pass information to the popup page so that "Trend" in the above code can be replaced with something that refers to the trend on the separate page. I don't know how to do this. I'm a PLC guy, not a VBA guy. Any help would be greatly appreciated