# IT/Excel/huge nerd

**URL:** <https://forums.speedlife.net/t/it-excel-huge-nerd/16704>\
**Category:** NYSpeed Off Topic\
**Created:** [August 30, 2006, 6:56am UTC](https://forums.speedlife.net/t/it-excel-huge-nerd/16704 "2006-08-30T06:56:37Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![zwarbyt](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/zwarbyt/32/7623_2.png) [@zwarbyt](https://forums.speedlife.net/u/zwarbyt)\
**Post date:** [August 30, 2006, 10:11am UTC](https://forums.speedlife.net/t/it-excel-huge-nerd/16704/9 "2006-08-30T10:11:13Z")

</div>

if anyone cares, set a macro in vb (altf11)

```
                Private NextSwitch As Date
               
                ' ***** HERE IS WHERE YOU SET THE VARIABLES (not case sensitive)
                Const File1 As String = "Filename 1.xls"
                Const File2 As String = "Filename 2.xls"
                Const TimeInterval As String = "00:02:00"

```

'“hh:mm:ss”

```
                Sub StartSwitching()
                 NextSwitch = Now + TimeValue(TimeInterval) 'current time + 2 minutes, change as needed
                 Application.OnTime EarliestTime:=NextSwitch, Procedure:="ShowNext"
                End Sub
               
                Sub EndSwitching()
                 Application.OnTime EarliestTime:=NextSwitch, Procedure:="ShowNext", Schedule:=False
                End Sub
               
                Private Sub ShowNext()
                 If LCase(ActiveWorkbook.Name) = LCase(File1) Then
                  Workbooks(File2).Activate
                 Else
                  Workbooks(File1).Activate
                 End If
                 NextSwitch = Now + TimeValue(TimeInterval)
                 Application.OnTime EarliestTime:=NextSwitch, Procedure:="ShowNext"
                End Sub
```

---

_[View the full topic](https://forums.speedlife.net/t/it-excel-huge-nerd/16704)._
