Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA
Hi,
I have a Data Validation in my sheet and i want to write code that when data Validation has changed the contents of 2 cells say D4 and D35 would cleared. Any idea would be much appreciated. Thanks, -- Farhad Hodjat |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA
Try using a worksheet change event.
Right click on the worksheet tab and select VIEW SOURCE. Paste this Private Sub Worksheet_Change(ByVal Target As Range) Dim mySheet As Worksheet Set mySheet = Target.Parent If Target.Count 1 Then Exit Sub If Not Intersect(Target, mySheet.Range("A1")) Is Nothing Then 'Change A1 above as needed. mySheet.Range("D4").ClearContents mySheet.Range("D35").ClearContents End If End Sub -- HTH, Barb Reinhardt "Farhad" wrote: Hi, I have a Data Validation in my sheet and i want to write code that when data Validation has changed the contents of 2 cells say D4 and D35 would cleared. Any idea would be much appreciated. Thanks, -- Farhad Hodjat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|