Private
Declare
Function
GetCursorPos
Lib
"user32"
(lpPoint
As
POINTAPI)
As
Long
Private
Type POINTAPI
x
As
Long
y
As
Long
End
Type
Dim
mymouse
As
POINTAPI
Public
Sub
Klick()
On
Error
Resume
Next
Dim
hasDropdown
As
Boolean
Dim
WshShell
As
Object
Set
WshShell = CreateObject(
"WScript.Shell"
)
GetCursorPos mymouse
ActiveSheet.Shapes(
"Rechteck 2"
).Visible =
False
ActiveWindow.RangeFromPoint(mymouse.x, mymouse.y).
Select
hasDropdown = ActiveCell.Validation.Type = xlValidateList
If
hasDropdown
Then
WshShell.SendKeys
"%{Down}"
,
True
ActiveSheet.Shapes(
"Rechteck 2"
).Visible =
True
End
Sub