Dashboard Macro Automation

IannW

New Member
Joined
Aug 25, 2018
Messages
18
Hi All
I have created a dashboard using excel. I will be displaying the dashboard on anoffice TV. I have around 5 differentworksheets on the dashboard and I want to switch between the worksheetsautomatically say every 10 minutes and loop back to the first before repeatinguntil the workbook/dashboard is closed, but then restart on opening.
I’m guessing I can record a macro to switch from sayworksheet 1 to worksheet 2 then worksheet 2 to worksheet 3 etc (I can do that),but how, using vba (I assume) can I run the next macro (3to4) 10 minutes later then the next (4to5) thenthe next (5to1), you get the picture.

Thanks in advance for the help you brilliant people provideto us newbies…
Iann W

 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try something like this

1. amend sheet names & wait times
- wat times are set to 1 second ("00:00:01") which is usefully quick when testing!
- wait times can differ between sheets
- to set to 10 minutes use "00:10:00" etc
2. amend the number of loops

in new standard module
Code:
Option Explicit
Sub RunDashboard()
    Dim c As Integer
    For c = 1 To 3                  'loops 3 times
        Call Dashboard
    Next
End Sub
Private Sub Dashboard()
    Call NextSheet("DB1", "00:00:01")
    Call NextSheet("DB2", "00:00:01")
    Call NextSheet("DB3", "00:00:01")
    Call NextSheet("DB4", "00:00:01")
    Call NextSheet("DB5", "00:00:01")
End Sub
Private Sub NextSheet(SheetName As String, waitTime As String)
    Sheets(SheetName).Activate
    Application.Wait (Now + TimeValue(waitTime))
End Sub

in ThisWorkbook module (auto runs when workbook opens)
Code:
Option Explicit

Private Sub Workbook_Open()
    Call RunDashboard
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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