Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / February 2005

Tip: Looking for answers? Try searching our database.

Populate Excel Listbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PC - 16 Feb 2005 11:17 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.