Hello can anyone help? I have an issue with a listbox, although I've had some help with it so far, I can't quite tie this up.
What I need Excel to do is bring up a userform with a listbox and three textboxes. The listbox filters rows in the worksheet, revealing an entire row only if a value in column J is less than zero.
When the user selects the row in the listbox and enters something in each textbox, upon clicking the 'ok' commandbutton:
For that row in the worksheet, insert a row underneath with no formatting.
In that new blank row:
Put textbox1 value in cell in column E
Put textbox2 value in cell in column D
Put textbox3 value in cell in column I
I've attached a sample worksheet with the data I'm working on.
Here's the code I have so far for filtering rows and displaying in the listbox:
Then, i've entered this code clicking on the commandbutton ok in the userform editor. This tries to enter the textbox info into the row selected:
Whilst the first part code works fine and lists what I need it to for the listbox, the commandbutton, when clicked, just does nothing and I don't know why. Perhaps because the commandbutton is part of a different sub in a different section and these two codes are not passing instructions on to one another.
Can anyone help?
Bookmarks