Auto Scroll Separate Files

jarett

Board Regular
Joined
Apr 12, 2021
Messages
179
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I am setting up a TV screen that is hooked up to a laptop (HDMI), I have 4-5 separate Excel files that I would like to display on the tv screen. The files are not live and will just refresh through out the day. I know I can adjust the size and have all of them open on the same screen but, I was looking for a way to have each one open at maximum screen size and basically toggle/scroll to each file every minute or so. Is this possible or do I need some third party software add on?
 
Okay, it turns out it doesn't like the full path and filename when activating sheets...so try this:

VBA Code:
Private Sub rotatesheets()
Dim lrow As Long
lrow = Sheet1.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row

'open sheets listed in column A on Sheet1
For x = 1 To lrow
Workbooks.Open Sheet1.Range("A" & x).Value
ActiveWindow.WindowState = xlMaximized
Next x

'start rotating sheets
restartloop:
For x = 1 To lrow
Workbooks(Mid$(Range("A" & x).Value, InStrRev(Range("A" & x).Value, "/") + 1, Len(Range("A" & x).Value))).Activate
Application.Wait (Now + TimeValue("00:01:00"))
Next x

GoTo restartloop
End Sub
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
One thing to note on the above, is if your file paths have a "\" rather than "/" then change that in the rotate sheets section.
 
Upvote 0
One thing to note on the above, is if your file paths have a "\" rather than "/" then change that in the rotate sheets section.
Okay, it turns out it doesn't like the full path and filename when activating sheets...so try this:

VBA Code:
Private Sub rotatesheets()
Dim lrow As Long
lrow = Sheet1.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row

'open sheets listed in column A on Sheet1
For x = 1 To lrow
Workbooks.Open Sheet1.Range("A" & x).Value
ActiveWindow.WindowState = xlMaximized
Next x

'start rotating sheets
restartloop:
For x = 1 To lrow
Workbooks(Mid$(Range("A" & x).Value, InStrRev(Range("A" & x).Value, "/") + 1, Len(Range("A" & x).Value))).Activate
Application.Wait (Now + TimeValue("00:01:00"))
Next x

GoTo restartloop
End Sub
Made the change and edited the code to account for "\", received a "run time error '9' Subscript out of range". It opened the files but didn't rotate and I noticed some of the charts in the files did not load all the way.
 
Upvote 0
Each file needs to be refreshed when opened if that makes a difference.
 
Upvote 0
try something like this:

VBA Code:
Private Sub rotatesheets()
Dim lrow As Long
lrow = Sheet1.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row

'open sheets listed in column A on Sheet1
For x = 1 To lrow
Workbooks.Open Sheet1.Range("A" & x).Value, UpdateLinks:=true
ActiveWindow.WindowState = xlMaximized
Next x

'start rotating sheets
restartloop:
For x = 1 To lrow
Workbooks(Mid$(Range("A" & x).Value, InStrRev(Range("A" & x).Value, "/") + 1, Len(Range("A" & x).Value))).Activate
Application.Wait (Now + TimeValue("00:01:00"))
Next x

GoTo restartloop
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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