i use vb.net with excel
i have a combobox which is filled with the name of the column of tables in excel file
I use this code to fill the combobox:
Dim LastCol As Integer = Form2.xlWorkSheet.Cells(1, Form2.xlWorkSheet.Columns.Count).End(XlDirection.xlToLeft).Column
Form2.xlWorkSheet = CType(Form2.xlWorkBook.Sheets(Form2.ComboBox1.Text), Excel.Worksheet)
Form2.xlWorkSheet.Activate()
If cmb1.Items.Count = Nothing Then
For x As Integer = 2 To LastCol
cmb1.Items.Add(Form2.xlWorkSheet.Cells(1, x).value)
Next
End If
what i want is when i select an item from the combobox ,which is a the name of a column , i can read all the value of this column after that i will multiply every time all this value(all the value of the column i select) with a value of a textbox that i will enter in it
Any suggestions?
Aucun commentaire:
Enregistrer un commentaire