grexcelman
Board Regular
- Joined
- Mar 1, 2015
- Messages
- 50
Not sure why this is breaking but I have a spreadsheet with dozens of tabs that require updating through this macro loop. It indexes the first and last pages, 30 to 80 but once it reaches the 39th tab, it breaks. I've tried moving the potential bad tab(running it separately at times) but it doesn't change the break. Any thoughts on where this code or my spreadsheet could be getting tripped up?
Code:
Worksheets("Monthly Trend").Select
' determine current bounds
Dim StartIndex, EndIndex, LoopIndex As Integer
StartIndex = Sheets("Monthly Trend").Index
EndIndex = Sheets("Transactions").Index
For LoopIndex = StartIndex To EndIndex
Sheets(LoopIndex).Select
RetrieveSheet
Next LoopIndex
Last edited: