Results 1 to 9 of 9

Thread: Opening Excel File - Every tab viewed automatically

  1. #1
    New Member
    Join Date
    Nov 2017
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Opening Excel File - Every tab viewed automatically

    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!

  2. #2
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    51,032
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    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.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  3. #3
    Board Regular
    Join Date
    Apr 2010
    Posts
    167
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    Quote Originally Posted by mjohnston0209 View Post
    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.

  4. #4
    New Member
    Join Date
    Nov 2017
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    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

  5. #5
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    51,032
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    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.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  6. #6
    New Member
    Join Date
    Nov 2017
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    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!

  7. #7
    Board Regular
    Join Date
    Apr 2010
    Posts
    167
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    Quote Originally Posted by mjohnston0209 View Post
    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?

  8. #8
    New Member
    Join Date
    Nov 2017
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    Yes, the Spreadsheet Server Addin was causing it.

  9. #9
    Board Regular
    Join Date
    Apr 2010
    Posts
    167
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Opening Excel File - Every tab viewed automatically

    Quote Originally Posted by mjohnston0209 View Post
    Yes, the Spreadsheet Server Addin was causing it.

    I figured it would be a silly add-in. Those rascally buggers have given me some of the strangest behavior's ive ever seen in Excel.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •