Kamis, 16 Oktober 2014

[ExcelVBA] Validation list change events


Good afternoon all,

I have created a valiation list and added the following code to it but I can't get it to fire/update until I manually move off of the list/cell then back on to it.

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Address = Me.Range("FormSel").Address Then
    If Target.Value = "Blended" Then
        Sheets("Blended").Visible = True
        Sheets("Blended").Visible = False
    End If
    If Target.Value = "Flat Rate" Then
        Sheets("Flat Rate").Visible = True
        Sheets("Flat Rate").Visible = False
    End If
    If Target.Value = "Preferred" Then
        Sheets("Preferred").Visible = True
        Sheets("Preferred").Visible = False
    End If
    If Target.Value = "Standard" Then
        Sheets("Standard").Visible = True
        Sheets("Standard").Visible = False
    End If

End If
End Sub
What am I missing?


Thank you,




Posted by: m_bacheldor@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

Visit our ExcelVBA group home page for more info and support files:

More free tutorials and resources available at:




Tidak ada komentar:

Posting Komentar