Switch sheet in workbook with VBA/loop and time schedueling

NiklasNordkvist

New Member
Joined
Jan 5, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi!

Hope someone can help me with this, I am not used to VBA but knows how to navigate there :D
How do I make a macro that change sheet in a workbook and also shows each sheet for 15 min before switching and then starts over with ex.sheet1?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Can this be something?
I want a eternal loop because the excel sheets will display a report with 4 different sheets for users to view. The report will be displayed on a monitor 24/7 so users can refer the report whenever they want to.

Sub SwitchSheet()

Application.WindowState = xlMaximized
ActiveWindow.WindowState = xlMaximized
Application.DisplayFullScreen = True

Dim i As Integer
Dim Pause As Double

Pause = 30 'Pause delay in seconds
Loops = 3 'How many loops do you want to do

For j = 1 To Loops
For i = 1 To 2

Worksheets(i).Select 'Select the next worksheet

x = Timer
While Timer - x < Pause 'This does the pausing
Wend

Next i
If j = Loops Then
j = 1
End If
Next j

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,747
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top