+ Reply to Thread
Results 1 to 3 of 3

If/Or and NULL logic

  1. #1
    Forum Contributor
    Join Date
    03-30-2020
    Location
    Gibraltar, Gibraltar
    MS-Off Ver
    365
    Posts
    150

    If/Or and NULL logic

    Hi,

    I'm trying this but although it activates the Button it does not deactivate.

    Why could this be?

    Private Sub ComboBox1_Change()
    If ComboBox1.Value = "United Kingdom" Or ComboBox1.Value = "United States" Then
    CommandButton4.Enabled = True
    End If
    If ComboBox1.Value = Null Then
    CommandButton4.Enabled = False
    End If
    End Sub
    Last edited by Michael Island; 04-16-2020 at 06:05 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: If/Or and NULL logic

    Try this...

    Please Login or Register  to view this content.
    Or This...
    Please Login or Register  to view this content.

    Or this...
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 04-08-2020 at 07:06 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    03-30-2020
    Location
    Gibraltar, Gibraltar
    MS-Off Ver
    365
    Posts
    150

    Re: If/Or and NULL logic

    Thanks the last one worked a treat and suits my future needs.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Is null / is not null code
    By nipthedog in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-26-2017, 05:37 PM
  2. Count rows with multiple null and not null criteria
    By carlostheba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2014, 05:16 AM
  3. Multiple Matching and indexing with null logic
    By jcorcoran in forum Excel General
    Replies: 2
    Last Post: 10-23-2011, 11:28 AM
  4. How to work with Null and Not Null Vales
    By frankee_gee in forum Excel General
    Replies: 1
    Last Post: 10-15-2009, 03:46 AM
  5. Code to replace null and not null strings
    By tigertim71 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2008, 05:07 PM
  6. Advanced filter - display null or non-null
    By Duddles in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2008, 11:17 PM
  7. [SOLVED] Null, "null", vbNull, vbNullString, vbEmpty
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2006, 08:30 AM

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