Help with: ListBox1.AddItem (ws.Name)

N

NightProbe

Using the following, how can I cause the result to return all but the
first four worksheet out of a 10 worksheets workbook?

Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ListBox1.AddItem (ws.Name)
Next ws

Best Regards
 
R

Ron de Bruin

Try this

It use the sheet index

Dim ws As Worksheet
Dim a As Integer
For a = 5 To ThisWorkbook.Worksheets.Count
ListBox1.AddItem Sheets(a).Name
Next a
 
Top