+ Reply to Thread
Results 1 to 5 of 5

Simple Function to Test for Data Validation STRANGE ISSUES

  1. #1
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Angry Simple Function to Test for Data Validation STRANGE ISSUES

    I have written what I consider to be a very simple function to test a cell for data validation but clearly I am missing something. The function returns true when it should return false and, after being run once, I receive a Function not defined error.

    I have rewritten it many different ways; here is the current version:
    Please Login or Register  to view this content.
    The function is stored in my PERSONAL.xlsb workbook and I am testing the function through the Immediate window of the VBE. I have tried referring to ActiveCell as well as a range with the same results. It works once but doesn't necessarily return the correct value and then I receive the "Sub or Function not defined" error on subsequent attempts.

    No clue why this isn't working.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Simple Function to Test for Data Validation STRANGE ISSUES

    I ran it like this with type 1 validation in G14 and it ran nicely:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: Simple Function to Test for Data Validation STRANGE ISSUES

    When I test it through a sub instead of through the immediate window, it runs nicely for me as well. It still will not run from the immediate window. Strange. Thank you for your help.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Simple Function to Test for Data Validation STRANGE ISSUES

    I never use the immediate window, I suspect that there is some protocol that your violating wrt the immediate window

  5. #5
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: Simple Function to Test for Data Validation STRANGE ISSUES

    Huh. I have been using it since I discovered it when I began programming a few years ago and have never encountered any behaviour I didn't expect. I will always test using something else now that I know it has its own ideas sometimes.

+ 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. [SOLVED] Data Validation ISSUES!!!
    By Will03 in forum Excel General
    Replies: 10
    Last Post: 10-27-2013, 07:15 AM
  2. Help with Data Validation issues
    By mal.b.graham in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2012, 04:52 AM
  3. Test Data Validation
    By maheshdalwani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2010, 06:09 PM
  4. Help with some strange issues
    By Ijit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2007, 02:44 PM

Tags for this Thread

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