Opening Excel File - Every tab viewed automatically

mjohnston0209

New Member
Joined
Nov 6, 2017
Messages
13
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!
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,405
Office Version
  1. 365
Platform
  1. Windows
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.
 

Steve_

Board Regular
Joined
Apr 28, 2010
Messages
167
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.
 

mjohnston0209

New Member
Joined
Nov 6, 2017
Messages
13
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
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,405
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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.
 

mjohnston0209

New Member
Joined
Nov 6, 2017
Messages
13
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!
 

Steve_

Board Regular
Joined
Apr 28, 2010
Messages
167

ADVERTISEMENT

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?
 

Watch MrExcel Video

Forum statistics

Threads
1,108,522
Messages
5,523,363
Members
409,514
Latest member
MarkZuckerberg

This Week's Hot Topics

Top