Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good afternoon,
I have some event code that when any cell in a certain range (which has validation referring to a worksheet list), a SENDKEY Down is sent and the screen display is zoomed up, to make reading of the drop down list easier. Once the user makes a selection from the list, the display is zoomed back down again. However, if when the validation list is displayed, if the Escape key is pressed, the display size remains the same. I have an ONKEY command, but it only works if the ESCAPE key is pressed subsequently (i.e. you need to press it twice). Is there a way by which VBA can detect that the Escape key was pressed when a validation list was displayed? Here's the code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'Zoom and simulate dropdown click when a cell in "ColWONo, ColA" is selected Application.OnKey "{ESC}", "Zoom120" ActiveWindow.Zoom = 120 If Target.Cells.Count = 1 Then 'Check that the selected cell is a single cell If Not Intersect(Target, Range("ColWOActivityRole")) Is Nothing Then ActiveWindow.Zoom = 150 Application.SendKeys ("%{DOWN}") End If End If End Sub Thanks in advance Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validation dropdown list is not available | Excel Discussion (Misc queries) | |||
Validation Dropdown list starts at b ottom of list | Excel Discussion (Misc queries) | |||
Excell Dropdown List. Display alternate text than found in list. | Excel Discussion (Misc queries) | |||
Trapping making a selection from a dropdown validation list | Excel Programming | |||
Validation Dropdown List | Excel Programming |