Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Populate a list box with all active workbooks except the curre

I was under the impression that Travis wanted the workbooks and not the
worksheets...
--
HTH...

Jim Thomlinson


"Gary Keramidas" wrote:

this is for listbox1 on a userform:

Private Sub UserForm_Activate()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name < ActiveSheet.Name Then
Me.ListBox1.AddItem ws.Name
End If
Next
End Sub

--


Gary

"travis" wrote in message
...
Hi,

I'm not sure how to go about this one...

I want a listbox control in a userform launched from
spreadsheetone.xls to display the names of all the other
spreadsheets. i.e. the user can select any workbook in the open
workbooks collection, but spreadsheetone.xls won't be in that list
(because the form is part of an exporting routine to copy charts and
tables from spreadsheetone.xls to a new worksheet in whichever open
workbook the user selects).

How do I put the names of all open workbooks into a listbox?

Travis




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Populate a list box with all active workbooks except the curre

you're probably right, my mistake.

--


Gary

"Jim Thomlinson" wrote in message
...
I was under the impression that Travis wanted the workbooks and not the
worksheets...
--
HTH...

Jim Thomlinson


"Gary Keramidas" wrote:

this is for listbox1 on a userform:

Private Sub UserForm_Activate()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name < ActiveSheet.Name Then
Me.ListBox1.AddItem ws.Name
End If
Next
End Sub

--


Gary

"travis" wrote in message
...
Hi,

I'm not sure how to go about this one...

I want a listbox control in a userform launched from
spreadsheetone.xls to display the names of all the other
spreadsheets. i.e. the user can select any workbook in the open
workbooks collection, but spreadsheetone.xls won't be in that list
(because the form is part of an exporting routine to copy charts and
tables from spreadsheetone.xls to a new worksheet in whichever open
workbook the user selects).

How do I put the names of all open workbooks into a listbox?

Travis






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
Using a current spreadsheet to populate a new one shadesofsisyphus Excel Discussion (Misc queries) 4 August 9th 06 08:04 PM
Populate current active cell - Help Please!! Larry Excel Worksheet Functions 0 July 19th 06 10:19 PM
use the current row in a list to populate a report David Murto Excel Worksheet Functions 1 April 13th 06 06:30 PM
Dialog Box List of Current Open Workbooks Frank & Pam Hayes Excel Programming 2 January 25th 04 02:28 PM
list Workbooks in Current Folder jC! Excel Programming 4 December 27th 03 01:12 AM


All times are GMT +1. The time now is 10:53 PM.

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

About Us

"It's about Microsoft Excel"