Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Extract All worksheet names in workbook

Hi...

How do you display all worksheet names in a workbook in a listview???

Thanks

wendy


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Extract All worksheet names in workbook

I'd do it like this:

Sub aa()
On Error Resume Next
Err = 0
CommandBars("Workbook Tabs").Controls("More sheets...").Execute
If Err < 0 Then CommandBars("Workbook Tabs").ShowPopup
End Sub


--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extract All worksheet names in workbook


Hello,

I had to do something similar: Writting all names in a text files with
some formating

The principle is to go thru the Names collection, and to filter special
cases like
- Invisible (system) names
- Formulas
..

Here is the main loop:

dim Nom as Name

For Each Nom In ActiveWbk.Names


'Filtre les parametres systemes (invisibles)
If Nom.Visible Then

'Detection des erreurs
'Cas ou le nom pointe dans le vide
If InStr(Nom.value, "#REF!") Then
reponse = MsgBox(" ERROR The name:[" & Nom.Name & "] has
lost its reference, Delete ?", vbYesNo)
If reponse = vbYes Then
Nom.Delete
End If
Else
Set PlageNom = Nothing
Set PlageNom = Nom.RefersToRange


'Filtre les formules, ainsi que les Noms sur plusieurs
cellules,
If Not PlageNom Is Nothing And Not IsArray(PlageNom)
Then

' Filtre le cas ou une cellule est en erreur de par sa
formule
If PlageNom.Text = "#VALEUR!" Then
MsgBox (" ERROR :" & Nom.Name & "/" & Nom.RefersTo
& ": Reference missing in formula")
Else

NbNoms = NbNoms + 1

Var_pro = Nom.Name & " = " & var_num

End If

Var_pro = StrConv(Var_pro, vbUpperCase)
liste_var = liste_var & Chr(car_sep) & Var_pro


' Convertit tout en majuscules
fichier.WriteLine (Var_pro)
End If
Else
FormulesNommees = True
End If

End If

End If

Next Nom


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract email addresses from 1 worksheet to another workbook Mark[_12_] Excel Discussion (Misc queries) 20 December 2nd 11 02:46 AM
Copy worksheet containing names to other workbook w/o problems? amsbam1 Excel Discussion (Misc queries) 1 December 3rd 08 04:23 PM
Copy worksheet with named ranges to new workbook and keep names Sandy Excel Worksheet Functions 0 July 11th 08 04:37 PM
Specific location to register the worksheet names of a workbook Fanny Excel Discussion (Misc queries) 5 September 29th 07 07:10 AM
How do I print a list of worksheet tab names in a workbook Clif Excel Worksheet Functions 3 March 2nd 05 09:38 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"