Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jimmy Hawkins   on Jan 14 In MS Office Category.

  
Question Answered By: Poppy Brown   on Jan 14

For populating two or more columns I generally use a two stage thing.
First AddItem to set  up the row  and then Add stuff to each column.

An actual example....

Me.lstStringSetWidth.AddItem
Me.lstStringSetWidth.List(Me.lstStringSetWidth.ListCount - 1, 0) = "Inches"
Me.lstStringSetWidth.List(Me.lstStringSetWidth.ListCount - 1, 1) = "/1000"

You can see that column  reference change from (n, 0) to (n, 1).
Using ListCount means I reference the last line... Which I've just added.

Share: