olorin
11-27-2005, 05:02 AM
http://users.igl.net/toonie/userfrm1.jpg
The UserForm above opens on sheet1 of my workbook.
I can get it to enter the productionfigure value into sheet1 into the relevant row dependant on what was clicked in ListBox1.
The problem is that I need the value to be entered into a different sheet named "Production".
ListBox1 is populated by a named range which at present has 131 items in it, and the macro calculates which row to put productionfigure.value into with 131 "If....Then" statements !!!!
Which is not only untidy but tiresome when a new item is added.
I need the productionfigure.value to be entered into the NEXT EMPTY cell in the relevant row depending on what was selected in ListBox1 in the Production sheet.
for example; if item 3 is selected i wish productionfigure.value to be entered into the next empty cell in row 3 of Production sheet, and if item 12 is selected then into the next empty cell in row 12 of Production sheet.
Also it would be nice if there is a smarter way to decide what was selected from ListBox1 without a zillion "If...Then" statements.
Your time is much appreciated.
The UserForm above opens on sheet1 of my workbook.
I can get it to enter the productionfigure value into sheet1 into the relevant row dependant on what was clicked in ListBox1.
The problem is that I need the value to be entered into a different sheet named "Production".
ListBox1 is populated by a named range which at present has 131 items in it, and the macro calculates which row to put productionfigure.value into with 131 "If....Then" statements !!!!
Which is not only untidy but tiresome when a new item is added.
I need the productionfigure.value to be entered into the NEXT EMPTY cell in the relevant row depending on what was selected in ListBox1 in the Production sheet.
for example; if item 3 is selected i wish productionfigure.value to be entered into the next empty cell in row 3 of Production sheet, and if item 12 is selected then into the next empty cell in row 12 of Production sheet.
Also it would be nice if there is a smarter way to decide what was selected from ListBox1 without a zillion "If...Then" statements.
Your time is much appreciated.