Cancel Button on Msgbox / Inputbox
Cancel Button on Msgbox / Inputbox
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Cancel Button on Msgbox / Inputbox

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    79
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Is there a way to stop the cancel button showing on Msg and Input boxes.

    Thx
    Roy

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    79
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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
    This will prevent the Cancel button from working.




User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com