VBA Userform Select All Cells that contain each value from each line of Multi Line Textbox

Good Evening Everyone,

Any help would be greatly appreciated here!

Im a beginer with excel VBA however I can normally get whatever I need to do working by searching around and trial and error but im really struggling with this one.

I have code that works for updating data on the row that any cells that are selected are on, however I also wish to be able to update each row based on a list of values rarther than having to select each cell first.

So i am basically looking for it to be able to get each value from each line in the multi line text box and then search column C for all values that match any of the values input, and then select them all.

Here are some screenshots which hopefully will help you to understand what im aiming for.

Apologies but I can post any code that remotely makes any sense to help towards this 🙁

Again I would be extremely grateful for any help here!

enter image description here
enter image description here

Thanks !

Dan

Struggling to find any info related to any part of this, believe me ive spent hours looking and patch bits together.

  • How did you load the multiline text box?

    – 

  • The multiline text box is just a blank text box on a userform, basically I want to be able to bulk edit records either based on the selected invoices (which I have working) or from a list that I paste in to the multi line text box. So on the form opening there will be no values in the text box. So what I need to do is when update button is clicked, it to get each value from each row of the textbox and select all cells in column C that match any of the values. Hope that makes sense and thanks for your reply!

    – 




  • But you ask how to Select All Cells that contain each value from each line of Multi Line Textbox and you do not even have such a text box? A multiline text box may keep continuous wrapped text or something separated by end line character(s). How to ask such a question if you do not even know what kind of data will you have there? Then, why using such a text box and not a list box?

    – 




  • Apologies if that does not make sense, but I still think it explains what I need? Basically i need to search and then select all cells containing any value from each line in the multi line textbox. Basically like a search box that can search for multiple invoices at once and select all the cells. Hope I make sense, sorry! Thanks

    – 

  • Hi, I do know that the data will always be invoice numbers which will be in column C, I haven’t used a list box as it doesn’t allow me to paste a list of data in to it which I want to search when I open the form, unless I am missing something? Apologies

    – 

Leave a Comment