+ Reply to Thread
Results 1 to 2 of 2

Problem with Data Validation Dropdown List / Worksheet_Change Event

  1. #1

    Problem with Data Validation Dropdown List / Worksheet_Change Event

    I'm using Excel 2003. I have the following code associated with my
    worksheet:

    Option Explicit

    Private Sub Worksheet_Change(ByVal Target As Range)

    Application.Calculation = xlCalculationManual
    Application.EnableEvents = False
    On Error GoTo ws_exit

    boolMinimumInfoCompleted = False
    boolErrorsFound = True
    boolAutomatedWorksheetChange = False

    If Not Application.Intersect(Target,
    ThisWorkbook.Names("InterestOnlyPeriod").RefersToRange) Is Nothing Then

    InterestOnlyPeriod_OnEntry

    End If

    If Not boolAutomatedWorksheetChange Then

    ValidateCostAnalysis
    Application.Calculate

    End If

    ws_exit:
    Application.EnableEvents = True
    Application.Calculation = xlCalculationAutomatic

    End Sub


    Here's the problem. "InterestOnlyPeriod" is the name of a cell that
    contains a data validation drop-down list. I've established that the
    Worksheet_Change event fires if I type a selection in the
    "InterestOnlyPeriod" cell or if I make a selection from the drop-down
    list. However, the first If..Then statement above only evaluates as
    "True" if I physically type a selection in the "InterestOnlyPeriod"
    cell. If I make a selection from the drop-down list, Worksheet_Change
    fires, but this If..Then statement evaluates as false.

    Any ideas? Does "Target" have a different value if a selection is made
    from the drop-down list?


  2. #2

    Re: Problem with Data Validation Dropdown List / Worksheet_Change Event

    This is apparently a bug. Further research turned up this earlier
    posting:

    http://groups.google.com/group/micro...c07358ae7be82a

    .... which describes a workaround.


+ 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