Opening Excel File - Every tab viewed automatically

mjohnston0209

Board Regular
Joined
Nov 6, 2017
Messages
55
For several excel files, when i open them, the file quickly cycles through every visible tab.This does not happen for all files, but most of them. In addition, some files have macros while others do not. I sent one of the files I was experiencing this issue on to a coworker, and she opened the file without it cycling through every tab. Is anyone able to help with this?

Thanks!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Is there any code in the "ThisWorkbook" module of the files where it cycles through the tabs?
If so, please post all the code in that module.
 
Upvote 0
For several excel files, when i open them, the file quickly cycles through every visible tab.This does not happen for all files, but most of them. In addition, some files have macros while others do not. I sent one of the files I was experiencing this issue on to a coworker, and she opened the file without it cycling through every tab. Is anyone able to help with this?

Thanks!

Also, check your Add-Ins and make sure something silly hasnt made its way in.
 
Upvote 0
This one file has coding, but another does not.

First Module coding:

Sub DataUpdate()

'Unhide Worksheets


Worksheets("Exp - Inc Report").Visible = True
Worksheets("ExpPivot").Visible = True
Worksheets("Graph Data").Visible = True

'Refresh Pivot Tables


ActiveWorkbook.RefreshAll


'Delete data on ExpPivot Tab


Sheets("Exp - Inc Report").Select


If Range("C8") = "" Then
Sheets("ExpPivot").Select
ElseIf Range("C9") = "" Then
Range("C8:G8").ClearContents
Sheets("ExpPivot").Select
Else
Range("C8:G8", Selection.End(xlDown)).ClearContents
Sheets("ExpPivot").Select
End If


'Transfer Info from ExpPivot Table to Exp - Inc Report Tab


If Range("A2") = "(blank)" Then
Range("A1").Select
ElseIf Range("A3") = "Grand Total" Then
Range("A4:D4").Copy
Range("A1").Select
Sheets("Exp - Inc Report").Select
Range("C8").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("C1").Select
Else
ActiveSheet.PivotTables("PivotTable1").ColumnGrand = False
Range("A2:D2", Selection.End(xlDown)).Copy
ActiveSheet.PivotTables("PivotTable1").ColumnGrand = True
Range("A1").Select
Sheets("Exp - Inc Report").Select
Range("C8").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("C1").Select
End If


'Update Incurred Profile with Current Period Incurred


Sheets("Incurred Profile").Select
date1 = Sheets("Incurred Profile").Range("G1")
Range("H7").Select
Cells.Find(What:=date1, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(2, 0).Select


Sheets("Cost Detail").Select
Range("L10:L59").Copy
Sheets("Incurred Profile").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("C1").Select


'Update Gross Profit Graph


Sheets("Graph Data").Select
date2 = Sheets("Graph Data").Range("C4")
Columns("B:B").Select
Cells.Find(What:=date2, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 25).Select


Sheets("Dashboard").Select
Range("G13:H13").Copy
Sheets("Graph Data").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False


'Hide Worksheets


Worksheets("Exp - Inc Report").Visible = False
Worksheets("ExpPivot").Visible = False
Worksheets("Graph Data").Visible = False


Sheets("Dashboard").Select
Range("A1").Select


End Sub

The second coding:

Sub PasteOldData()


Dim i As Integer


i = 9


'Copy and paste FAC and Total Incurred into previous Month Summary on Cost Detail Tab

Sheets("Cost Detail").Select
Range("H10:H59").Copy
Range("N10").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("J10:J59").Copy
Range("O10").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("B1").Select

'Clear amounts within current month and hide current month column on Materials & Subs Tab

Sheets("Materials & Subs").Select


Do Until IsEmpty(Cells(19, i))


If Cells(19, i).Value > Range("F1") And Cells(19, i).Value <= Range("G1") Then
Cells(19, i).Offset(2, 0).Select
Range(ActiveCell, ActiveCell.Offset(47, 0)).ClearContents
ActiveCell.EntireColumn.Hidden = True
i = i + 1


Else


i = i + 1


End If


Loop


'Change end date and save file
Sheets("Dashboard").Select
Range("F1").FormulaR1C1 = "=EOMONTH(RC[2],1)"
Selection.Copy
Range("H1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("F1").ClearContents
Range("A1").Select

End Sub
 
Upvote 0
I am only looking for coding specifically in the "ThisWorkbook" module.
That is where automated code that runs upon opening the file would reside.
The code you posted does not look like Event Procedure code that would typically be found in that module.
 
Upvote 0
Got it! My company recently added Spreadsheet Server to our Excel files. I changed the setting to always Enabled when I open Excel. I disabled it, removing the cycle through worksheets when opening the file.

Thanks!
 
Upvote 0
Got it! My company recently added Spreadsheet Server to our Excel files. I changed the setting to always Enabled when I open Excel. I disabled it, removing the cycle through worksheets when opening the file.

Thanks!


So it was an add-in then?
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,954
Members
448,535
Latest member
alrossman

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