Click dropdown list in Excel cells - vba
I use Excel "Data Validation" to create some dropdown lists in cells. When need to select an item in the list, I have to click in the cell and then click the down arrow on the right then the list will drop down. So it needs 2 clicks. Is there some vba code to use so when the first click in the cell, the list will drop down, no need the second click? Thanks.
February 17th, 2015 10:36pm

Hi Ian3,   Right click sheettab, choose View code and paste this in the window that appears:   Private Sub Worksheet_SelectionChange(ByVal Target As Range)     Dim lDVType As XlDVType     If Target.Cells.Count = 1 Then         On Error Resume Next         lDVType = Target.Validation.Type         On Error GoTo 0         If lDVType = xlValidateList Then             SendKeys "%{down}"         End If     End If End Sub    
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 12:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics