PC Review


Reply
Thread Tools Rate Thread

Application Sendkey (when value selected)

 
 
=?Utf-8?B?UmFqYXQ=?=
Guest
Posts: n/a
 
      9th Dec 2006
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
-----------------------------------------------------------------------------

any help will be appreciated
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      10th Dec 2006
Rajat, your explanation of what you are attempting to do is not clear. The
code to clear the contents would be:

ThisSheetName.Range("$X$8:$Y$8").ClearContents

with ThisSheetName being your worksheet name. If you want this to happen as
a result of the selection of an item from the drop down list, you will have
to complete the action with the selection to get a worksheet change to fire
and then you can trigger the clear contents through the worksheet change
event. I am only guessing at what you want to do.

"Rajat" wrote:

> 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
> -----------------------------------------------------------------------------
>
> any help will be appreciated

 
Reply With Quote
 
=?Utf-8?B?UmlzaGk=?=
Guest
Posts: n/a
 
      11th Dec 2006
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SendKey???? duncanjx@optusnet.com.au Microsoft Access Queries 1 4th May 2008 10:58 PM
sendkey =?Utf-8?B?VG9ubg==?= Microsoft Access VBA Modules 1 19th Oct 2006 02:45 PM
SendKey Gunawan Microsoft C# .NET 0 11th Sep 2006 08:42 AM
What is the Sendkey for Alt? =?Utf-8?B?amxzYXNzb2M=?= Microsoft Access Macros 3 24th Jul 2006 02:48 PM
Sendkey to IIS Application from NT Service. Alexander Ovchinnikov Microsoft C# .NET 0 13th Apr 2004 08:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:10 PM.