View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Multicolumn Listbox with variable range

Dick gave you an excellent reference.

This group is a good place to look as well.

Here are some additional sources: (listboxes are documented with all the
msforms 2.0 controls and userforms - so each article is not specifically
aimed at listboxes alone).

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.
http://j-walk.com/ss/excel/tips/tip84.htm

http://support.microsoft.com/default...b;en-us;829070
How to use Visual Basic for Applications examples to control UserForms in
Microsoft Excel

Here are some other sources of information:


http://support.microsoft.com/?id=168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97
File Name: WE1163.EXE
File Size: 161742 bytes
File Date: 05/08/97
Keywords: kbfile
Description: This Application Note is an introduction to manipulating
UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual
Basic for Applications macros that show you how to take advantage of the
capabilities of UserForms and use each of the ActiveX controls that are
available for UserForms

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en...FormsPartI.asp
Part II
http://msdn.microsoft.com/library/en...ormsPartII.asp


http://support.microsoft.com/default...;EN-US;Q168067

http://support.microsoft.com/support.../q213/7/32.asp
XL2000: Using the LoadPicture Function with an Image Control

--
Regards,
Tom Ogilvy

"Dick Kusleika" wrote in message
...
dht

Here's some pages from my site that discuss listboxes


http://search.atomz.com/search/?sp-q...p-f=ISO-8859-1


--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

dht wrote:
Thats great. Thanks very much. Are there any good online resources I
can look at so that I can try those for the future.

Thanks


"Tom Ogilvy" wrote in message
...
If you use the rowsource property it should update each time the
sheet calculates or a cel is edited.

Private Sub Userform_Initialize()
Dim rng as Range
Listbox1.ColumnCount = 2
With Worksheets("Sheet1")
set rng = .Range(.Range("A2"), _
.Cells(rows.count,1).End(xlup)) _
.Resize(,2)
End With
ListBox1.RowSource = rng.Address(External:=True)
End Sub

--
Regards,
Tom Ogilvy




"dht" wrote in message
...
I'm trying to create a listbox in a user form (C_Panel) that is
multicolumn, and references a two column but variable row range (A2
to B?). Can someone point me to how to do this.

Also how do I get the listbox to automatically reflect any changes
to the range or does it do it automatically?

Using Excel 2000

Thanks
David