A
Aaron1978
Hi all,
I have a simple list box with two columns. The data for the columns are
read in from a worksheet within the workbook.
4421
When the user selects which steel grade they wish to use and then
clicks add; the data from the table is read to a spread sheet cell via
the following piece of code:
Private Sub subPutData()
Sheets("Sheet1").Select
Cells(8, 3).Value = lstGradeAndSMYS.Value
End Sub
This reads in the numerical value from the list box (i.e. SMYS, i.e.
the second column). What I would also like to be able to do is read in
the Steel Grade (i.e. the first column) and write that to a different
cell. I guess what I don't understand is why the above code chooses the
second column over the first column to write the data to Cell(8,3).
Any help would be greatly appreiated.
Best Regards,
Aaron
+-------------------------------------------------------------------+
|Filename: table.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=4421 |
+-------------------------------------------------------------------+
I have a simple list box with two columns. The data for the columns are
read in from a worksheet within the workbook.
4421
When the user selects which steel grade they wish to use and then
clicks add; the data from the table is read to a spread sheet cell via
the following piece of code:
Private Sub subPutData()
Sheets("Sheet1").Select
Cells(8, 3).Value = lstGradeAndSMYS.Value
End Sub
This reads in the numerical value from the list box (i.e. SMYS, i.e.
the second column). What I would also like to be able to do is read in
the Steel Grade (i.e. the first column) and write that to a different
cell. I guess what I don't understand is why the above code chooses the
second column over the first column to write the data to Cell(8,3).
Any help would be greatly appreiated.
Best Regards,
Aaron
+-------------------------------------------------------------------+
|Filename: table.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=4421 |
+-------------------------------------------------------------------+