View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jason M[_2_] Jason M[_2_] is offline
external usenet poster
 
Posts: 2
Default list the sheets in a workbook

here is a vb.net example that should work for ya.

Dim sheet As Excel.Worksheet
Dim ODOC As Excel.Workbook

................

Dim worksheetname As String
For Each sheet In ODOC.Worksheets
Console.WriteLine(sheet.Name)
Next

"Listing of Excel shhets in a workbook" wrote:

I need to be able to list the names of the sheets contained in a workbook.