From: jday on
I would like to include a message box to my macro that prompts user to select
one of two options, or to CANCEL. I know you can create an Answer Box that
provides a Y/N/Cancel option, but I really don't want to use "YES" or "NO".
For example, I'd like the message to say "Would you like to copy your data to
SHEET1 or SHEET2?" Then have buttons labeled SHEET1 / SHEET2 /CANCEL
(instead of YES / NO / CANCEL). Can this be done?
From: Mike on
You need to create a userform to do what you want. Then on your userform put
a listbox with sheetnames and then the user could select the sheetname from
the listbox and hit ok.

"jday" wrote:

> I would like to include a message box to my macro that prompts user to select
> one of two options, or to CANCEL. I know you can create an Answer Box that
> provides a Y/N/Cancel option, but I really don't want to use "YES" or "NO".
> For example, I'd like the message to say "Would you like to copy your data to
> SHEET1 or SHEET2?" Then have buttons labeled SHEET1 / SHEET2 /CANCEL
> (instead of YES / NO / CANCEL). Can this be done?
From: SteAXA on
MsgBox(prompt[, buttons] [, title] [, helpfile, context])

In buttons you can use VbYesNoCancel
if user select:
yes msgbox return vbYes (=6),
no msgbox return vbNo (=7),
cancel msgnox return vbCancel (=2).

Ste'
From: Rick Rothstein on
Or, for the three options the OP asked about, he could use three
CommandButtons in place of the ListBox.

--
Rick (MVP - Excel)



"Mike" <Mike(a)discussions.microsoft.com> wrote in message
news:8B443C2D-E527-413D-88E4-B49372163041(a)microsoft.com...
> You need to create a userform to do what you want. Then on your userform
> put
> a listbox with sheetnames and then the user could select the sheetname
> from
> the listbox and hit ok.
>
> "jday" wrote:
>
>> I would like to include a message box to my macro that prompts user to
>> select
>> one of two options, or to CANCEL. I know you can create an Answer Box
>> that
>> provides a Y/N/Cancel option, but I really don't want to use "YES" or
>> "NO".
>> For example, I'd like the message to say "Would you like to copy your
>> data to
>> SHEET1 or SHEET2?" Then have buttons labeled SHEET1 / SHEET2 /CANCEL
>> (instead of YES / NO / CANCEL). Can this be done?

From: NoSpam on
Create a User Form and put whatever buttons you want on it. I put together
a very simple example. I put it at http://sample/sample.xls

On Mon, 24 May 2010 08:53:01 -0700, jday <jday(a)discussions.microsoft.com>
wrote:

>I would like to include a message box to my macro that prompts user to select
>one of two options, or to CANCEL. I know you can create an Answer Box that
>provides a Y/N/Cancel option, but I really don't want to use "YES" or "NO".
>For example, I'd like the message to say "Would you like to copy your data to
>SHEET1 or SHEET2?" Then have buttons labeled SHEET1 / SHEET2 /CANCEL
>(instead of YES / NO / CANCEL). Can this be done?

 |  Next  |  Last
Pages: 1 2
Prev: Running another program
Next: Protection