I am using Excel 2007. I have coded a userform which functions like Excel 2010 Autofilter dropdown and assigned alt+down shortcut for this userform load macro. Now I am trying to show the In-Cell dropdown aka the default drop in a cell instead the userform if the cell is not in autofilter range like below.
Sub AUTOFILTEREXCEL2010VERSION()
If ActiveSheet.AutoFilterMode Then
Load AutoFilterfrm
AutoFilterfrm.Show
Else
'Application.OnKey "%{DOWN}", "" 'Tried this alternative also
Application.OnKey "%{DOWN}"
'Application.SendKeys "%{DOWN}" 'Tried this alternative also
SendKeys "%{DOWN}"
Application.OnKey "%{DOWN}", "AUTOFILTEREXCEL2010VERSION"
End If
End Sub
Thanks to Kamlesh Kishor for the image.
The problem is the above code does not display the in-Cell dropdown list like the above image i.e. if ActiveSheet.AutoFilterMode
is False.