![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 79
|
Is there a way to stop the cancel button showing on Msg and Input boxes.
Thx Roy |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Roy
Try MsgBox "Hello", vbOKOnly You will find out all the info you need and more by reading the help in Excel on the MsgBox Function. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 79
|
Will try that for my Msg boxes but does it work the same for inputboxes??????
Not sure that it does....do you know how to do this on an inputbox Roy |
|
|
|
|
|
#4 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Roy
While you cannot omit tye Cancel Button from an InputBox a (default) InputBox will return empty text ("") when the Cancel Button is clicked, so you could just use: Code:
Dim strReply As String
ShowIt:
strReply = InputBox("Type any Text", "PREVENT CANCEL")
If strReply = "" Then GoTo ShowIt
MsgBox strReply
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|