Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing an OnKey


I am looking for the code that will immediately drop the validation lis
when I enter into a giving cell.

Setting up the event is no problem, but I am stuck the code tha
actually drops the validation list.

I have tried using the macro recorder to emulate dropping the list, bu
it just doesn’t capture it.

If there is no method for dropping the list, I know that Alt+DownArro
accomplishes the task. Is there a way to force an OnKey upon enterin
the cell?

Someone is going to find this question trivial, or the answe
intuitive, but isn’t me. I appreciate any time that can be giving t
getting me through this issue.

Thanks,

Bir

--
Bir
-----------------------------------------------------------------------
Bird's Profile: http://www.excelforum.com/member.php...fo&userid=2446
View this thread: http://www.excelforum.com/showthread.php?threadid=46779

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing an OnKey


Is this what you are looking for?

Application.SendKeys ("%{DOWN}")


--
Peter81
------------------------------------------------------------------------
Peter81's Profile: http://www.excelforum.com/member.php...o&userid=25353
View this thread: http://www.excelforum.com/showthread...hreadid=467791

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing an OnKey


Yes SIR! That’s it. Thank you so very much.

Bir

--
Bir
-----------------------------------------------------------------------
Bird's Profile: http://www.excelforum.com/member.php...fo&userid=2446
View this thread: http://www.excelforum.com/showthread.php?threadid=46779

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing an OnKey


Your Welcome

--
Peter8
-----------------------------------------------------------------------
Peter81's Profile: http://www.excelforum.com/member.php...fo&userid=2535
View this thread: http://www.excelforum.com/showthread.php?threadid=46779

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Forcing an OnKey

Bird,

Taking Peter's example a stage further, you could paste this into the code
sheet of the sheet containing your dropdown list:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target = Range("Cell") Then
Application.SendKeys ("%{DOWN}")
End If
End Sub

Whenever you click the cell, the dropdown will automatically be displayed
(the code assumes that the cell containing the validation list has a range
name of "Cell")

Or, you can invoke the dropdown manually:

Sub ForceDropDownList()
Range("Cell").Select
Application.SendKeys ("%{DOWN}")
End Sub

Hope this helps - I found it very useful!

Regards

Pete

"Bird" wrote:


I am looking for the code that will immediately drop the validation list
when I enter into a giving cell.

Setting up the event is no problem, but I am stuck the code that
actually drops the validation list.

I have tried using the macro recorder to emulate dropping the list, but
it just doesnt capture it.

If there is no method for dropping the list, I know that Alt+DownArrow
accomplishes the task. Is there a way to force an OnKey upon entering
the cell?

Someone is going to find this question trivial, or the answer
intuitive, but isnt me. I appreciate any time that can be giving to
getting me through this issue.

Thanks,

Bird


--
Bird
------------------------------------------------------------------------
Bird's Profile: http://www.excelforum.com/member.php...o&userid=24469
View this thread: http://www.excelforum.com/showthread...hreadid=467791




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Forcing an OnKey

Bird,

Taking Peter's example a step further, try pasting this into the code sheet
of the sheet containing your drop down list:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target = Range("Cell") Then
Application.SendKeys ("%{DOWN}")
End If
End Sub

It assumes that the cell containing the validation has a name "Cell". As
soon as you select the cell, the dropdown will be displayed.

Alternatively, you could just do it manually with this code in a standard
macro sheet.

Sub ForceDropDownList()
Range("Cell").Select
Application.SendKeys ("%{DOWN}")
End Sub

Hope this helps

Pete

"Bird" wrote:


I am looking for the code that will immediately drop the validation list
when I enter into a giving cell.

Setting up the event is no problem, but I am stuck the code that
actually drops the validation list.

I have tried using the macro recorder to emulate dropping the list, but
it just doesnt capture it.

If there is no method for dropping the list, I know that Alt+DownArrow
accomplishes the task. Is there a way to force an OnKey upon entering
the cell?

Someone is going to find this question trivial, or the answer
intuitive, but isnt me. I appreciate any time that can be giving to
getting me through this issue.

Thanks,

Bird


--
Bird
------------------------------------------------------------------------
Bird's Profile: http://www.excelforum.com/member.php...o&userid=24469
View this thread: http://www.excelforum.com/showthread...hreadid=467791


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing an OnKey


Yes Pete, the first option offered is pretty much the one I went with.
do however, appreciate the added information that you have taken th
time to offer

--
Bir
-----------------------------------------------------------------------
Bird's Profile: http://www.excelforum.com/member.php...fo&userid=2446
View this thread: http://www.excelforum.com/showthread.php?threadid=46779

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnKey query Libby Excel Programming 3 August 31st 05 03:22 PM
code help - onkey bforster1[_8_] Excel Programming 3 July 25th 04 05:45 PM
onkey help wardy Excel Programming 0 July 20th 04 05:49 PM
onkey peter Excel Programming 2 March 2nd 04 07:34 PM
Onkey Jase Excel Programming 1 November 17th 03 11:07 PM


All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"