Chance1234
IS-IT--Management
Just an observation, unless i missed something obvious
I have a form with the following controls
txt_status
cbo_clientref
cbo_dyear
cbo_dday
cbo_dmonth
txt_contractno
txt_shareholder
txt_fundname
txt_amountreceived
txt_salescharge
txt_amountinvested
txt_price
txt_sharesissued
txt_total
cbo_type
and a listbox called lst_contracts
If i try to update the listbox like this
I get an error always at .column(10 even though the listbox has enough columns.
Setting the columncount in code makes no difference
using .list instead of column seems to make no difference
In the end i have split the listbox into two.
Im using Excel 2003
Chance,
F, G + HH
I have a form with the following controls
txt_status
cbo_clientref
cbo_dyear
cbo_dday
cbo_dmonth
txt_contractno
txt_shareholder
txt_fundname
txt_amountreceived
txt_salescharge
txt_amountinvested
txt_price
txt_sharesissued
txt_total
cbo_type
and a listbox called lst_contracts
If i try to update the listbox like this
Code:
Dim int_lcount As Integer ' for finding out list value
int_lcount = lst_contracts.ListCount
With lst_contracts
.AddItem
.Column(1, int_lcount) = txt_status
.Column(2, int_lcount) = cbo_clientref
.Column(3, int_lcount) = cbo_clientref.Column(1, cbo_clientref.ListIndex)
.Column(4, int_lcount) = cbo_dday
.Column(5, int_lcount) = cbo_dmonth
.Column(6, int_lcount) = cbo_dyear
.Column(7, int_lcount) = txt_contractno
.Column(8, int_lcount) = txt_shareholder
.Column(9, int_lcount) = txt_fundname
.Column(10, int_lcount) = txt_amountreceived
.Column(11, int_lcount) = txt_salescharge
.Column(12, int_lcount) = txt_amountinvested
.Column(13, int_lcount) = txt_price
.Column(14, int_lcount) = txt_sharesissued
.Column(15, int_lcount) = txt_total
End With
I get an error always at .column(10 even though the listbox has enough columns.
Setting the columncount in code makes no difference
using .list instead of column seems to make no difference
In the end i have split the listbox into two.
Im using Excel 2003
Chance,
F, G + HH