Hi,
I'm using this piece of code to populate an excel userform listbox with the
name of each worksheet in a workbook
i = 1
For Each ws In Worksheets
Worksheets.Select
Sheets(i).Activate
ListBox1.AddItem (ActiveSheet.Name)
i = i + 1
Next ws
Is there a better way I can do this as this could visable activates each
sheet each time the listbox is repopulated.
Thanks
..pc
Bob Phillips - 16 Feb 2005 14:17 GMT
i = 1
For Each ws In Worksheets
ListBox1.AddItem (Worksheets(i).Name)
i = i + 1
Next ws

Signature
HTH
RP
(remove nothere from the email address if mailing direct)
> Hi,
>
[quoted text clipped - 15 lines]
>
> ..pc