> Oops, sorry ... my fault...
>
[quoted text clipped - 44 lines]
> > > > Debug.Print MyFile.Worksheets(lngSheet).Name
> > > > Next lngSheet
> If you use Format | Sheet | Unhide menu, you don't see the "missing" sheets
> listed there? If they're hidden, they should show in that list.
>
> If a sheet is hidden, then its Visible property is set to False.
I think you meant to say, if a sheet is hidden, then its Visible
property will coerce to False. The Worksheet.Visible property is a
Long integer and relates to the Excel.XlSheetVisibility enumeration.
I'm not sure why you are enumerating all worksheets (which would
include hidden and very hidden sheets anyhow). Why not simply:
Set MySheet = Nothing
On Error Resume Next
Set MySheet = MyFile.Worksheets(SheetName.Value)
On Error Goto 0
If MySheet Is Nothing Then
' no such sheet ....
Else
' there is such a sheet ...
End If
Jamie.
--
Mauricio Silva - 01 Nov 2004 15:12 GMT
Now I understand... I was looking at Window | Unhide menu and this option is
disabled, then I thought some thing was wrong. I should be looking at Format
| Sheet | Unhide menu... here I can see them all.
I know this is not a Excel list but thanks for the help in Excel.
Mauricio Silva
P.S. I am listing them all because my client wants to select the spreadsheet
to be imported.
Thanks again
> > If you use Format | Sheet | Unhide menu, you don't see the "missing" sheets
> > listed there? If they're hidden, they should show in that list.
[quoted text clipped - 22 lines]
>
> --