View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Simon Chang Simon Chang is offline
external usenet poster
 
Posts: 4
Default How to get a sheets name or list.

Actually, I use "Application.GetOpenFilename" code to browse my workbooks
and pick any of them (but not to open them) which is from there I tries to
retrieve the sheets name. So I tried your codes by adding my codes but it
not respond to my code.

This is what I've tried:

Sub ShowSheetList()
'Jim Rech
mybook = Application.GetOpenFilename("Pick any workbook (*.xls), *.xls",
vbApplicationModal, "Good Luck")

On Error Resume Next
If mbook.Sheets.Count <= 16 Then
Application.CommandBars("Workbook Tabs"). _
ShowPopup 500, 225
Else
Application.CommandBars("Workbook Tabs"). _
Controls("More Sheets...").Execute
End If
On Error GoTo 0
End Sub

Your respond is on my appreciations and thanks in advance.