View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rajat Rajat is offline
external usenet poster
 
Posts: 39
Default ATTN : Ron (Multiple Dependent DV List Auto Update)

Hi Ron

you gave me this code to Update Dependent DV List automatically i.e.
Cell A1 and B1 having DV through DataValidationList

When Cell Value of A1 Change following code clear cell B1 content and popup
a Msg Box to select value from the list

'--------that code is ----------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngParentCell As Range
Dim rngDepCell As Range
Dim rngCell As Range

Set rngParentCell = Range("A1")
Set rngDepCell = Intersect(Target, rngParentCell)

If Not rngDepCell Is Nothing Then
Set rngCell = Range("A2")
rngCell.ClearContents
rngCell.Select
MsgBox _
Title:="Notice", _
Prompt:="You must now select an item from cell A2", _
Buttons:=vbInformation + vbOKOnly
Application.SendKeys ("%{DOWN}")

End If

Set rngParentCell = Nothing
Set rngDepCell = Nothing
Set rngCell = Nothing

End Sub
'--------end of code----------

Now my problem is 1 have 3 Dependent DV on the sheet i.e.
on cell A1 value dependent is DV list of B1, DV list of C1 and DV list of D1

from the above code When A1 value change Msg Box popup and cell Ba selected,
but i need when value A1 change msg box appear and cell B1 selected and after
selecting value in B1 again msg box pop up and C1 selected and after
selecting value in C1 again msg box appear and cell D1 selected.

Thans in advance,