i need ur help..
i have 10 combobox & 10 textbox on windows forms
it's names like :
cmbsign1 txtdiscount1
cmbsign2 txtdiscount2
cmbsign3 txtdiscount3
cmbsign4 txtdiscount4
cmbsign5 txtdiscount5
i just make a for loop to fatch combobox and textbox's value
Expand|Select|Wrap|Line Numbers
- dim sign as new combobox
- dim discount as new textbox
- j=1
- For i = 0 To 10
- sign = CType("cmbSign" & j, ComboBox)
- txt.Name = "discount" & j
- discount.Text = txt.Text
- MsgBox(discount.Text)
- discount.Text = ("txtdiscount" & j)
- commission.Text = ("txtcommission" & j)
- j = j + 1
- Next
================
sign = CType(cmbSign1, ComboBox) if we do like this then work but i want
sign like
sign = CType("cmbSign" & j, ComboBox)
it gives error that can not convert from string to combobox..
can anybody help me?
any help will be appriciated..
thanking u in advanced..