How do you WANT it to work?
You wrote this as the SelectionChange event.
that means that it only runs when you select a cell.
and the target is the cell you've SELECTED.
If you make it a Change event,
then it will operate on the cell that's been Changed.
Paul
-----------------------------------------
"Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can." - John Wesley
-----------------------------------------
"Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can." - John Wesley
-----------------------------------------
From: "m_bacheldor@yahoo.com [ExcelVBA]" <ExcelVBA@yahoogroups.com>
To: ExcelVBA@yahoogroups.com
Sent: Thursday, October 16, 2014 1:12 PM
Subject: [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
Else
Sheets("Blended").Visible = False
End If
If Target.Value = "Flat Rate" Then
Sheets("Flat Rate").Visible = True
Else
Sheets("Flat Rate").Visible = False
End If
If Target.Value = "Preferred" Then
Sheets("Preferred").Visible = True
Else
Sheets("Preferred").Visible = False
End If
If Target.Value = "Standard" Then
Sheets("Standard").Visible = True
Else
Sheets("Standard").Visible = False
End IfEnd If
End Sub
What am I missing?Thank you,Mark
__._,_.___
Posted by: Paul Schreiner <schreiner_paul@att.net>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
----------------------------------
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:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
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:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar