Results 1 to 9 of 9

Thread: Userform problem [Message box for missing entry in opt and chk button]

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    Option Button value give either TRUE or FALSE and not ""

    so try

    Code:
    If Not (optAAA.Value) + (optBBB.Value) + (optCCC.Value) Then
        optCCC.SetFocus
        MsgBox "Pls choose product"
        Exit Sub
    End If
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    6
    Rep Power
    0
    Thank you very much sir your code works fine

    Heres the code I use before and put 'Test for incomplete entry

    But I will use your code
    Code:
        If optAAA = True Then
            ActiveCell.Offset(0, 6).Value = "AAA"
        ElseIf optBBB = True Then
            ActiveCell.Offset(0, 6).Value = "BBB"
        ElseIf optCCC = True Then
            ActiveCell.Offset(0, 6).Value = "CCC"
        Else
            ActiveCell.Offset(0, 6).Value = ""
        fraProduct.SetFocus
        MsgBox "Pls Choose product"
        Exit Sub   
     End If

    How about in checkbox? Any ideas sir
    Last edited by Excel Fox; 05-21-2013 at 08:32 AM. Reason: Quote Removed

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    6
    Rep Power
    0
    Quote Originally Posted by Admin View Post
    Hi

    Option Button value give either TRUE or FALSE and not ""

    Sir Admin Based on your code it seems to be the and Checkbox Button also works but only for 1 box.
    Assuming 2 checkbox or 3 checkbox will be tick

    Kindly help me
    Last edited by ranthrave; 05-20-2013 at 02:53 PM.

Similar Threads

  1. Solve Block If Without End If Problem
    By jffryjsphbyn in forum Excel Help
    Replies: 3
    Last Post: 06-12-2013, 11:06 AM
  2. Replies: 4
    Last Post: 04-05-2013, 12:08 PM
  3. Message Box Pop-Up "yes or no"
    By Ryan_Bernal in forum Excel Help
    Replies: 1
    Last Post: 02-19-2013, 06:20 PM
  4. Display sheet names in a message box
    By pells in forum Excel Help
    Replies: 4
    Last Post: 02-13-2013, 07:33 PM
  5. Message Box Before Saving Document
    By Lucero in forum Excel Help
    Replies: 2
    Last Post: 04-15-2012, 07:09 AM

Posting Permissions

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