Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default msgbox buttons

Can anyone tell me why in Excel 2000 I can only produce a msgbox with a vbokonly button. In j-walks book Excel 2002 Power Programming with VBA, chapter 8 pg 200 it says that I should be able to have various arrangements of buttons
  #2   Report Post  
Posted to microsoft.public.excel.programming
xld xld is offline
external usenet poster
 
Posts: 1
Default msgbox buttons

Don't know why you can't, but MsgBox supports all sorts of buttons as
its buttons arguement
vbOKOnly 0 Display OK button only.
VbOKCancel 1 Display OK and Cancel buttons.
VbAbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
VbYesNoCancel 3 Display Yes, No, and Cancel buttons.
VbYesNo 4 Display Yes and No buttons.
VbRetryCancel

You can also set other flags, such as vbcritical. See the help for
details.


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default msgbox buttons

Hi
just define the second parameter of msgbox accordingly.
e.g.
msgbox("test",vbAbortRetryIgnore)

-----Original Message-----
Can anyone tell me why in Excel 2000 I can only produce a

msgbox with a vbokonly button. In j-walks book Excel 2002
Power Programming with VBA, chapter 8 pg 200 it says that
I should be able to have various arrangements of buttons
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default msgbox buttons

What code are you using? The buttons and their captions are
determined by the second argument to the MsgBox function. If you
omit this second argument, the default is vbOKOnly. Try, for
example, code like

MsgBox "Click", vbOKCancel
MsgBox "Click", vbYesNo
MsgBox "Click", vbRetryCancel

See the on line help for MsgBox for more details about the
constants you can provide to control the buttons.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"jmikerea" wrote in message
...
Can anyone tell me why in Excel 2000 I can only produce a

msgbox with a vbokonly button. In j-walks book Excel 2002 Power
Programming with VBA, chapter 8 pg 200 it says that I should be
able to have various arrangements of buttons


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default msgbox buttons

Thanks for the help.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
Form buttons vs. ActiveX Buttons GeorgeJ Excel Discussion (Misc queries) 3 August 11th 07 09:02 PM
have toggle buttons but everytime print preview buttons move TinSandhu Excel Discussion (Misc queries) 1 October 11th 06 02:57 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM
Cancel buttons in Msgbox Patrick Molloy Excel Programming 0 September 19th 03 07:59 AM


All times are GMT +1. The time now is 05:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"