Results 1 to 6 of 6

Thread: Little help?

  1. #1

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Little help?

    Code:
    Private Sub Check1_Click()
        If vbYes = MsgBox("Are you sure you want to Bring to front?", _
                          vbQuestion + vbYesNo, _
                          "Countdown Timer") Then
    If vbNo Then
    Check1.Click = False
    End Sub
    so I want it, if the user selects no, that the box will not be selected..I'm sure thats easy
    what I have doesnt work (whats new)

  2. #2
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Little help?

    Quote Originally Posted by |2eM!x
    Code:
    Private Sub Check1_Click()
        If vbYes = MsgBox("Are you sure you want to Bring to front?", _
                          vbQuestion + vbYesNo, _
                          "Countdown Timer") Then
    If vbNo Then
    Check1.Click = False
    End Sub
    so I want it, if the user selects no, that the box will not be selected..I'm sure thats easy
    what I have doesnt work (whats new)
    Try this:

    Code:
    If(MsgBox("Are you sure you want to Bring to front?", _
                          vbQuestion + vbYesNo, _
                          "Countdown Timer")=vbNo) Then
       Me.Check1.Value=False
    else
       Me.Check1.Value=True
    End If

  3. #3
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Little help?

    You may get in the infinite loop by doing such stuff - you better control that from command button:
    VB Code:
    1. Private Sub Command1_Click()
    2.     If MsgBox("Are you sure you want to Bring to front?", _
    3.                       vbQuestion + vbYesNo, _
    4.                       "Countdown Timer") = vbYes Then
    5.          Check1.Value = vbChecked
    6.     Else
    7.          Check1.Value = vbUnchecked
    8.     End If
    9. End Sub

  4. #4

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Little help?

    okay so i added a button like you said, seeing as its a button i cant have value.check = 1, so i ignore that..
    now i want it to make it so all msgboxs come up as vbnormalfocus, how would i do that? msgbox = vbnormalfocus?

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Little help?

    you can't specify that. it is the default, anyways. if you don't like it, you can always make your own.

  6. #6

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