Hi All,
Is there any way to custom a msgbox's response buttons? I want a msgbox to give three options, Copy, Paste or Cancel, and then run the corresponding code.
Many thanks,
Alastair
Hi All,
Is there any way to custom a msgbox's response buttons? I want a msgbox to give three options, Copy, Paste or Cancel, and then run the corresponding code.
Many thanks,
Alastair
Re: Custom Msgbox response buttons
Hi,
You can mess around with them to change the make up - i.e. permutations of "OK", "Cancel", "Help" etc but to change the text on the buttons themselves would be beyond me. Have you thought of just designing a userForm to mimic the windows msgBox ?
John
Re: Custom Msgbox response buttons
I am attempting that option now, having read a few other posts, I am beginning to realise that it is my only option
Unfortunately I have zero experience in UserForms thus far, so could take a little time. I am sure with the help of this forum it should not be too strenuous. Thanks for your reply
Alastair
Re: Custom Msgbox response buttons
Userform buddy best way for sure - do You have ideas (code example) glad to have a play for You and see what You thing
Msgbox has Yes/No/Ok or other defaults no custom labels thou as You desire
jiuk
Re: Custom Msgbox response buttons
Ok, stuck already, very basic I know:
What is the code you use to close a user form?
And even more basic, how do you assign the user form to a button? (Since it doesn't show up in the Assign Macro box)
Many thanks
Alastair
Re: Custom Msgbox response buttons
Try this example
jiuk
Re: Custom Msgbox response buttons
Jack, you've done it again! Thank you so much! That makes perfect sense.
Alastair
Re: Custom Msgbox response buttons
You can also do something like this using the APIhttp://"http://shutupdean.com/blog/2014/08/01/vba-msgbox-custom-button-text/"
http://shutupdean.com/blog/2014/08/01/vba-msgbox-custom-button-text/
Re: Custom Msgbox response buttons
Yes Jack, you have done it again
Fished this thread up from the internet. I know this is an old thread. Some forums get upset when someone replies to an old thread, but I had to.
I have never used userforms. From your example I completed my first, in like an hour. Really cool
Thanks
Re: Custom Msgbox response buttons
Quote from Jack in the UK;181820Try this example
jiuk
Great little example, thanks for posting. Very new to the forum though have searched here for advice a bit over the last 12 months I think.
Just learning how to use UserForms and this was a great little "leg up".
Thanks!
Don’t have an account yet? Register yourself now and be a part of our community!