Is there a way to write a VBA that will search a Userform text box for several words, then if a word from the list is in the textbox a message will open up? I have no idea on how to code this. Thank you in advance.
You don't add a module to a userform. The userform has a ready to use module by default.
What you do is :
1- Press Alt+F11 to get to to the VB environement.
2- Insert > UseForm from the Main menu.
3- Insert a commandbutton and a textbox from the Controls toolbox. (this will give you CommenadButton1 and TextBox1 by default.)
4- DoubleClick the UserForm to get to the Form Module.
5- Delete any code you find in the Form module white pane.
6- Place the code in my previous post in the form module.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.