>Hello,
>
[quoted text clipped - 6 lines]
>Thanks,
>Peter
I think your problem is not with the prompt, rather that you're using
parentheses around the parameters but you aren't assigning the
function result to anything. Try writing
nResult = MsgBox(prompt:=strOption1, Buttons:=vbYesNo)
where nResult is declared as an Integer. Alternatively, you can
implicitly use the function result in a logical statement:
If MsgBox(prompt:=strOption1, Buttons:=vbYesNo) = vbYes Then
' ...
End If
When you use MsgBox as a subroutine (not returning a value), then you
must omit the parentheses:
MsgBox prompt:="This is my message"
See http://www.word.mvps.org/FAQs/MacrosVBA/BracketsWithArgmnts.htm
for an explanation.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
Peter - 22 Nov 2005 19:46 GMT
Hi Jay,
I am now using :
Response = MsgBox(prompt:=strOption1, Buttons:=vbYesNo)
How do I get the title in the title bar of the message box to display
something other than the default (Word).
Thanks,
Peter
> >Hello,
> >
[quoted text clipped - 34 lines]
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
Charles Kenyon - 22 Nov 2005 20:29 GMT
Set the Title property as well.
, Title:="This is my message box. Please read!"

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> Hi Jay,
>
[quoted text clipped - 47 lines]
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.
Peter - 22 Nov 2005 21:01 GMT
Thanks Charles,
That Worked!
> Set the Title property as well.
> , Title:="This is my message box. Please read!"
[quoted text clipped - 49 lines]
> >> Email cannot be acknowledged; please post all follow-ups to the
> >> newsgroup so all may benefit.