I'm currently pulling text from a cell on a worksheet to a textbox on a userform. I don't even know if it's possible, but I ideally want to be able to put a symbol in the cell that separates lines and creates bullet points in the textbox.
For instance, make this information in a cell:
NOTE (SALE): SAID HE CAN ONLY GIVE THAT BIG AMOUNT ONCE A YEAR AND WANTS TO DO IT FOR THEM. JUST STARTED WORKING AGAIN SO PM IS BEST - NOTE (SALE): TRIED TO GIVE THROUGH THE MAIL, JUST BRING UP HIS CARD INFO (2/9/23)
Look like this in the textbox:
NOTE (SALE): SAID HE CAN ONLY GIVE THAT BIG AMOUNT ONCE A YEAR AND WANTS TO DO IT FOR THEM. JUST STARTED WORKING AGAIN SO PM IS BEST
NOTE (SALE): NOTE (SALE): TRIED TO GIVE THROUGH THE MAIL, JUST BRING UP HIS CARD INFO (2/9/23)
I also, if possible, want to be able to tab through the different bullet points. Is this even possible?
If you're asking for the textbox to display output as a proper bulleted list (like it does in Markdown), I don't believe that's possible. However, a plain-text list is doable. Textboxes have a
Multilineproperty as well as aScrollbarsproperty. You can set them manually in the Userform editor or do it with VBA during Userform Initialization:For the list creation, if the input is guaranteed to match your example, a simple replacement will add a linebreak at every "-"
However, you'll want to add more text parsing to get the correct output. As a start, you could use
InStr(txt,"-")to determine if you should add the dash to the start.Moving onto the Tab feature, the
KeyPressevent can be utilized (replace "TextBox1" with your TextBox's name):In order for Tab to actually work, you'll have to enable its typical behavior in the Userform. Once again, this can be done manually via editor or with VBA
TextBox.TabBehavior = TRUE.