Hello,
Welcome to the forum.
You can simulate the menu item being clicked in VBA:
Code:
Sub SimulateClickTimeRange()
Dim cb As PBCommandBar
Set cb = Application.CommandBars("Time Range Toolbar")
Dim c As PBCommandBarControl
Set c = cb.FindControl(, 32786)
c.Execute
Set c = Nothing
Set cb = Nothing
End Sub
Just be sure to consider that if you have any symbols selected then the time range is applied to those symbols. You may need to call "ThisDisplay.Symbols.RemoveAll" if you want to set the Display object time range.
Principal Consultant
Real-Time Data Management @ Wipro Technologies