When I create a msgbox in VBA, the user cannot interact with the text at all. In my case, I want the user to be able to highlight and copy the text. I'm thinking the better way to do this may be to add a button that copies the text to the clipboard. Any suggestions?
Escape Character in VBA In programming languages “\” — a backslash — is generally used as an escape character. Example : \n for newline, \t for tab space. But in VBA, we use a function named “chr()”. This in-built function returns the ASCII equivalent value of the parameter.
For this code:
msgbox "Does Control+C work on a lowly, old message box?"
you can press ctrl + c, open notepad, ctrl + v and you will get this:
--------------------------- Microsoft Excel --------------------------- Does Control+C work on a lowly, old message box? --------------------------- OK ---------------------------
You can use an inputbox instead of a message box
inputbox "Copy the below text", "Copy Text", "Text value"
inputbox copy text
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With