olorin
Board Regular
- Joined
- Feb 7, 2005
- Messages
- 87
Hi people (Happy New Year to All)
I have a user form to gather information and place it in relevant sheets.
All works fine (with the excellent help from this forum).
The trouble is that when it puts the value of the listbox into the "monthly" sheet, It just puts the value of the first column from the listbox into the sheet.
I wish it to put the value of SECOND column of the listbox into the sheet.
How can I do this?
I have tried a number of things to no avail. Below is the part of the code that i need to modify;
With Worksheets("monthly")
FinalRow = Sheets("monthly").Range("A65536").End(xlUp).row
EntryRow = FinalRow + 1
.Range("A" & EntryRow).Value = Sheets("main").Range("produpdate").Value
.Range("B" & EntryRow).Value = ProdIn.ListBox1.Value
.Range("C" & EntryRow).Value = ProdIn.ListBox1.Value
.Range("D" & EntryRow).Value = ProdIn.productionfigure.Value
End With
It's the Second "ProdIn.ListBox1.Value" that needs changing to be able to select the value of the second column of the listbox and not as it does now, the value of the first column.
I have tried putting "ProdIn.ListBox.Column2.Value"
but I can't get that to work.
Any help is, as always, much appreciated.
I have a user form to gather information and place it in relevant sheets.
All works fine (with the excellent help from this forum).
The trouble is that when it puts the value of the listbox into the "monthly" sheet, It just puts the value of the first column from the listbox into the sheet.
I wish it to put the value of SECOND column of the listbox into the sheet.
How can I do this?
I have tried a number of things to no avail. Below is the part of the code that i need to modify;
With Worksheets("monthly")
FinalRow = Sheets("monthly").Range("A65536").End(xlUp).row
EntryRow = FinalRow + 1
.Range("A" & EntryRow).Value = Sheets("main").Range("produpdate").Value
.Range("B" & EntryRow).Value = ProdIn.ListBox1.Value
.Range("C" & EntryRow).Value = ProdIn.ListBox1.Value
.Range("D" & EntryRow).Value = ProdIn.productionfigure.Value
End With
It's the Second "ProdIn.ListBox1.Value" that needs changing to be able to select the value of the second column of the listbox and not as it does now, the value of the first column.
I have tried putting "ProdIn.ListBox.Column2.Value"
but I can't get that to work.
Any help is, as always, much appreciated.