VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Neat VB Trick (Copy MsgBox Contents)

by [])utch[]v[]aster (18 Submissions)
Category: Miscellaneous
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (16 Votes)

Copies the Caption, Text, and Buttons of a Message Box.. SUPER easy.

Rate Neat VB Trick (Copy MsgBox Contents)



It is actually a very easy thing to do.. Lets take this example. You are programming a very complex application. You get an error MsgBox with an error number, a description, and some buttons. How do I record this? Beleive it or not, I used to take a screenshot of the msgbox, and print it in Photoshop. I never knew you could simply hit: CTRL-C when the message box has focus. The MsgBox Caption, Text, and Buttons will all be copied to the clipboard in this manner:


---------------------------

Error Title

---------------------------

TESTING 123

---------------------------

Yes No Cancel 

---------------------------




Please note, when pressing CTRL-C on the message box, you may hear a system beep (indicating you've pressed an invalid key). At least thats what happens on my computer. This is not the case. In this instance, the beep means "Copied to Clipboard"... Enjoy this tip.

Download this snippet    Add to My Saved Code

Neat VB Trick (Copy MsgBox Contents) Comments

No comments have been posted about Neat VB Trick (Copy MsgBox Contents). Why not be the first to post a comment about Neat VB Trick (Copy MsgBox Contents).

Post your comment

Subject:
Message:
0/1000 characters