Sendkey to show me the dropdown:

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
My current code as below: in m5 i have a validation drop down....
'm trying to use sendkey to show me the drop down when i execute this code but for now no error msg...but it didnt even work as i thought it might work..:biggrin:
'm using this sendkey because when we hit alt and down arrow it shows us the drop down if available in cell...


Please correct my code:

Thanks for helping
Pedie;)


Code:
Sub try()
Sheet1.Range("M5").Select
Application.sendkeys "%+({DOWN})"
End Sub
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
this seems to work but why is it not showing me the validation drop down?:confused:

Code:
Sub try()
Sheet1.Range("M5").Select
sendkeys "%+({DOWN})"
End Sub
 
Upvote 0
Try using this Worksheet_SelectionChange event code

<font face=Courier New><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_SelectionChange(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range)<br>    <SPAN style="color:#00007F">If</SPAN> Target.Address = "$M$5" <SPAN style="color:#00007F">Then</SPAN><br>        SendKeys "%{down}"<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Upvote 0

Forum statistics

Threads
1,223,941
Messages
6,175,541
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top