Frank Rudd via OfficeKB.com
Guest
Re: Delete Sheets in VBA Project
Okay, thanks.
okaizawa wrote:
>Hi,
>that macro outputs result to 'immidiate' window in the visual basic
>editor. for example,
>
>***** Book1.xls *****
>Sheet1 Sheet1 Visible
>Sheet2 Sheet2 Visible
>Sheet3 Sheet3 Visible
>
>the 1st column is sheet name in the vb project, the 2nd column is name
>in the workbook.
>in this list, are there the sheets that you are seeing in 'project' window?
>are they all visible?
>if there are not all sheets, try the following macro. this lists all
>vbcomponents in the active workbook. a number in the 2nd column is
>component type.(1:standard module, 2: class module, 3: userform)
>
>Sub Test2()
> Dim vbc As Object
> Debug.Print "***** " & ActiveWorkbook.Name & " *****"
> For Each vbc In ActiveWorkbook.VBProject.VBComponents
> If vbc.Type = 100 Then
> If Not vbc.Properties("Parent").Object Is Application Then
> Debug.Print vbc.Name, vbc.Properties("Name"), _
> IIf(vbc.Properties("Visible") = -1, "Visible", "Hidden")
> End If
> Else
> Debug.Print vbc.Name, vbc.Type
> End If
> Next
>End Sub
>
>if they are unusual hidden sheets, the project might be corrupt.
>
>> The worksheets were hidden. The code didn't find them, but for anybody else
>> who has this problem, I opened the properties window and while one of the
>[quoted text clipped - 9 lines]
>>>
>>>>>Any help is appreciated.
--
Message posted via http://www.officekb.com
Bookmarks