CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Try this one

  1. #1
    Join Date
    Jul 1999
    Location
    Australia
    Posts
    39

    Try this one

    Hi,
    How do i put up a confirm box in visual basic?
    This confirm box is used to allow the person to choose whether the record should be deleted or no?
    I would appreciate it if anyone out there could show me the code.
    Thanks in advance,
    Derek

    Ps: I am using

    bChoice = window.confirm([sMessage])

    how do i use this ??? or any other method.
    Thanks




  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Try this one

    use an msgbox:


    dim intAnswer as integer
    intAnswer = msgbox("Your text here",vbYesNo+vbQuestionmark,"title here")
    if intAnswer = vbYes then
    ' code to delete record
    else
    ' code not to delete record
    endif




    Tom Cannaerts
    [email protected]
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Guest

    Re: Try this one

    In VB you would use the following

    If MsgBox("Delete Record?", vbQuestion + vbYesNo) = vbYes then
    'deleterecord
    else
    'do nothing
    End If





Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured