Hello Everyone
I need help with some VBA to show a message in a text box when a number is entered into a cell. There are 6 different pieces of text depending on which number is entered.
Any help would be great!
Hello Everyone
I need help with some VBA to show a message in a text box when a number is entered into a cell. There are 6 different pieces of text depending on which number is entered.
Any help would be great!
Hello jiminic,
Is this TextBox on a UserForm or Worksheet? What are the six values to display, and what are the numbers?
Sincerely,
Leith Ross
Hi Leith
Thanks for your response. this is in a worksheet and the numbers are ranging as follows:
<21,
>21 but <30,
>31 but <40,
>41 but <50,
>51 but <60, and
>60
Thank you again
Hello jiminic,
You could use the Select Case statement for this.
Sincerely,![]()
Please Login or Register to view this content.
Leith Ross
Thank you Leith
One last question though, where do I put the code, and how do I make it so that when the number is entered into a specific cell, eg: E38, that the message box appears?
Hello jiminc,
Do you have a range of cells this will apply to?
Thanks,
Leith Ross
Just one cell Leith. The total is derived from the sum of other cells.
Hello jiminic,
How to Save a Worksheet Event Macro![]()
Please Login or Register to view this content.
1. Copy the macro using CTRL+C keys.
2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
3. Left Click on View Code in the pop up menu.
4. Paste the macro code using CTRL+V
5. Save the macro in your Workbook using CTRL+S
Sincerely,
Leith Ross
Thank you Leith, you are a life saver!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks