Application Sendkey (when value selected)

R

Rajat

Hi

Got the code from this forum (By Ron) how can i define a action after the
Application.SendKeys ("%{DOWN}") procedure

i mean i want when the value is selected from the DV list by the user, then
select Cell Range("$X$8:$Y$8") that is also a marged cell DV list and
clearits content

complete code is as follows
------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngParentCell As Range
Dim rngDepCell As Range
Dim rngCell As Range

Set rngParentCell = Range("$C$6:$T$6")
Set rngDepCell = Intersect(Target, rngParentCell)
If Not rngDepCell Is Nothing Then
Set rngCell = Range("$V$6:$X$6")
rngCell.ClearContents
rngCell.Select
MsgBox _
Title:="Village Name", _
Prompt:="You must now select the 'Village Name'", _
Buttons:=vbInformation + vbOKOnly
Application.SendKeys ("%{DOWN}")
'Here i want Code to do following -
'After that when the value is selected from the DV list Select
'select Cell Range("$X$8:$Y$8") and clear its content
End If

Set rngParentCell = Nothing
Set rngDepCell = Nothing
Set rngCell = Nothing
End Sub
 
R

Rishi

Hi JLGWhiz

you have guessed perfectly what i want.

actually what i want is when any value of the drop Down DV list (it had 7
value) in cell $V$6:$X$6 is selected (by Clicking on it) after that (After
the mouse click) cell $X$8:$Y$8 to be selected and its content cleared.

Can u write that code, b'coz i dont have any programming experience.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top