PC Review


Reply
 
 
ranswrt
Guest
Posts: n/a
 
      25th Apr 2008
How do I use 'additem' on a listbox that has 7 columns in it?
Thanks
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      25th Apr 2008
For multi column listBox use the list property in the UF initialize event.

Private Sub UserForm_Initialize()
ListBox1.List(0, 0) = "FirstRow, FirstCol"
ListBox1.List(0, 1) = "FirstRow, SecondCol"
ListBox1.List(0, 2) = "FirstRow, ThirdCol"
End Sub

Remember the row and column indexes are zero based. If you have a large
number of items to add, you might want to use list fill from a range.

"ranswrt" wrote:

> How do I use 'additem' on a listbox that has 7 columns in it?
> Thanks

 
Reply With Quote
 
ranswrt
Guest
Posts: n/a
 
      25th Apr 2008
I already have a listbox with items in it. I also have textboxes that get
the new data to add the the list box. What is the best way to add the new
data to the end of the list?
Thanks

"JLGWhiz" wrote:

> For multi column listBox use the list property in the UF initialize event.
>
> Private Sub UserForm_Initialize()
> ListBox1.List(0, 0) = "FirstRow, FirstCol"
> ListBox1.List(0, 1) = "FirstRow, SecondCol"
> ListBox1.List(0, 2) = "FirstRow, ThirdCol"
> End Sub
>
> Remember the row and column indexes are zero based. If you have a large
> number of items to add, you might want to use list fill from a range.
>
> "ranswrt" wrote:
>
> > How do I use 'additem' on a listbox that has 7 columns in it?
> > Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.additem =?Utf-8?B?ZXJuaWU=?= Microsoft Excel Programming 1 5th Sep 2006 05:31 PM
.AddItem Caligo Microsoft Access 14 13th Jul 2006 01:47 PM
AddItem =?Utf-8?B?QW5kcmUgU2tlZW4=?= Microsoft Access Form Coding 1 20th Apr 2005 02:23 PM
.ADDITEM Alex Microsoft Access 10 22nd Jul 2004 06:08 PM
AddItem Claire Microsoft Access VBA Modules 3 30th Jan 2004 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:04 AM.