How can I switch from processbook screen. I have 5 screens open and I would like to toggle them every 15 seconds using vba
it is a good question.
From this post, it uses browser to achieve.
If you want to run it by VBA, you need to write a code for it.
I tested in my environment.
Private num As Integer
Private DSP As Display
Private Sub Display_DataUpdate()
num = num + 1
If num = 3 Then
num = 0
Set DSP = Application.Displays.Open("Displaypath\DisplayName.pdi", True)
Private Sub Display_Open()
num = 0
DataUpdate method is called every 5 seconds. So I count 3 times which is 15 seconds and after that, go to different display.
Without close, VBA always runs. You need to put the code for 5 displays with different display names.
Hope it works for you.
Hi Kenji. Thank you for our help.
But, I would like stwitch the screens every 15 seconds each one, after that the screen change.
As 5 screens open, and click on the button to start:
Open "Screen 1" wait 15 seconds
Open "Screen 2" wait 15 seconds
Open "Screen 5" wait 15 seconds
retorns from screen 1....
Making this with full sreen
Humm, my code should changes the display every 15 seconds since default data update method runs every 5 seconds. If you put my code to 5 displays with correct display name on Application.Displays.Open, it should work. I understand that there is no start button function, though it is easy to write code by VBA.
Retrieving data ...