+ Reply to Thread
Results 1 to 4 of 4

If/Then when dealing with data validation

Hybrid View

narrowgate88 If/Then when dealing with... 09-22-2009, 10:18 AM
Bob Phillips Re: If/Then when dealing with... 09-22-2009, 11:20 AM
narrowgate88 Re: If/Then when dealing with... 09-22-2009, 11:28 AM
Bob Phillips Re: If/Then when dealing with... 09-22-2009, 06:46 PM
  1. #1
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    365
    Posts
    242

    Question If/Then when dealing with data validation

    I'm trying to construct an IF-Then statement.

    If CampusName = "CLICK TO PICK CAMPUS" Then MsgBox "Please click ok to select Campus Name.", vbOKOnly + vbExclamation, "Required Information is Missing"
    This code isn't working correctly and I wonder if it is because "CLICK TO PICK CAMPUS" is a value in a data validation drop down.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: If/Then when dealing with data validation

    Is there a trailing space in the DV list?

    Where does CampusName get set?

  3. #3
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    365
    Posts
    242

    Re: If/Then when dealing with data validation

    There is not a trailing space in the DV list.

    The data validation is set to I3. I renamed that cell CampusName. Is that what you were asking?

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: If/Then when dealing with data validation

    Yes it is, so I guess the code should be

    If Range("CampusName").Value = "CLICK TO PICK CAMPUS" Then _
    MsgBox "Please click ok to select Campus Name.", vbOKOnly + vbExclamation, "Required Information is Missing"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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