Results 1 to 2 of 2

VBA IF True "AND?" IF Blank Question

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-14-2014
    Location
    US
    MS-Off Ver
    2013
    Posts
    135

    VBA IF True "AND?" IF Blank Question

    Hopefully a easy one that I am over complicating How would write this to work together if checkbox one is true and crsbox2 is "" then msgbox "enter something"

    If CheckBox1.Value = True Then
        If crsBox2.Text = "" Then
            MsgBox "enter something"
            End With
            Exit Sub
        End If
    End If
    Also can an OR be tossed in for a dual validation?
    If CheckBox1.Value Or CheckBox2.Value= True Then
        If crsBox2.Text = "" Then
            MsgBox "enter something"
            End With
            Exit Sub
        End If
    End If

    okay I was over complicating it wouldnt matter about the checkbox so long as it checked the crsBox so this worked
        If crsBox2.Text = "" Then
            MsgBox "enter something"
            End With
            Exit Sub
        End If
    Last edited by Mr_Bill; 09-27-2014 at 12:19 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 09-25-2013, 01:51 PM
  2. [SOLVED] Test for blank cell should be "True" but "False" action is taken.
    By Aceso in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-09-2013, 05:47 PM
  3. Error Message - .PivotItems("(blank)").Visible = True
    By srinuy2kin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2011, 02:48 PM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1