Strange Sheet and Workbook names on my VBE

Akbarov

Active Member
Joined
Jun 30, 2018
Messages
347
Office Version
  1. 365
Platform
  1. Windows
Hello Dear community,

Can anyone explain me why do I have so many sheet names on my VBE? I don't have those sheets on my workbook. I also have extra Workbook named "ThisWorkbook1"

Thanks in advance.

1708253184351.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
That's odd. Are they all hidden? The 2nd workbook would be a red flag to me and I'd be worried about workbook corruption and make some backups before poking at it further. I'd probably create a new workbooks using 'Save-As' and then see if it was the same in the new workbook. I have a macro that I run when I want to get a quick read on how many hidden/visible sheets in a workbook there are. Here it is, if it is of any use to you.
VBA Code:
Sub SheetInfo()
    Dim Sh As Object
    Dim WS As Worksheet
    Dim S As String, V As String, MyTabs As String
    
    MsgBox "This macro displays sheet information in the VBE 'Immediate' window.", vbOKOnly Or vbInformation, "Workbook '" & ActiveWorkbook.Name & "'"


    S = S & "Sheet Information (Workbook '" & ActiveWorkbook.Name & "')" & vbNewLine
    S = S & ActiveWorkbook.Sheets.Count & " sheets found." & vbNewLine
    S = S & "---------------------------------------" & vbNewLine
    For Each Sh In ActiveWorkbook.Sheets
        S = S & Sh.CodeName & " (" & Sh.Name & ")"
        If Len(Sh.CodeName & " (" & Sh.Name & ")") > 16 Then
            MyTabs = VBA.String(1, vbTab)
        Else
            MyTabs = VBA.String(2, vbTab)
        End If
        S = S & MyTabs & "Type: " & TypeName(Sh)
        S = S & ", Protected: " & CStr(Sh.ProtectContents = True)
        Select Case Sh.Visible
        Case -1
            V = "xlSheetVisible"
        Case 0
            V = "xlSheetHidden"
        Case 2
            V = "xlSheetVeryHidden"
        Case Else
            V = "?"
        End Select
        S = S & ", Visbility: " & V & vbNewLine
    Next Sh
    Debug.Print S
End Sub
 
Upvote 0
Solution
Thanks for the reply, yes, I did the same. Copied all modules, saved as xlsx, then inserted modules again.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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