View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
augustus augustus is offline
external usenet poster
 
Posts: 49
Default why can't I additem to multi-column this way..

hi,

Why is it that I can't populate a combobox the following way:

Sheet1.ComboBox2.List(intRow, 1) = RS.Fields("test01").Value
Sheet1.ComboBox2.List(intRow, 2) = RS.Fields("test02").Value
RS.MoveNext
I got this idea based on the Help file from Excel 2003
I have defined the number of Column = 2

i tried Dick Kusleika way, without problem:
Sheet1.ComboBox2.AddItem RS.Fields("test01").Value
Sheet1.ComboBox2.List(Sheet1.ComboBox2.ListCount - 1, 1) =
RS.Fields("test02").Value

thanks