Asked By
cara king
20 points
N/A
Posted on - 01/13/2012
I have developed a macro in Excel which will prompt to enter 2 cell numbers. My plan is that it will display a message box which shows the cell numbers entered by the user. But the message box is showing ‘TRUE’ instead of the cell number entered by the user. Please give me the solution.
How to display message box in macro
Hi Cara,
As you developed a macro which will prompts to enter 2 cell numbers and will display cell numbers entered by user with a message box. However message box is showing “TRUE” instead of the cell number. I would suggest you to use below code for message box to display cell value:
MsgBox "User Entered: " & " " & Range("A" & n).Value
Where n is any integer value (Dim n) which will help you in locate the cell number for which you want to display message.
How to display message box in macro
Hello Cara,
As you developed that macro, I am sure that you are very good with visual basic language. I can make sure that almost everything is fine just one variable misplaced. Just check the variables in the lower part of the script. Please check the conditions and variables in there. I love languages. Now for those people who don't know about macros, for them I want to say that it is an easy work and using this you can create your own kind of work environment.
Thank you,
Riley Weaver.