I have some activex ListBox controls on my worksheet. I have applied a macro that opens the litsbox on double_click on any cell.
The issue is that in excel versions 2010 or less, I am unable to select any item from he listbox as the mouse cursor gets stuck in plus sign.
If I zoom in/out the sheet, the issue works for sometime then again gets back to same plus icon state.
This is issue does not occur in excel version above 2010.
Edit: Code snippet:
`Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim colName, strRange As String
strRange = Target.Address
colName = Replace(Target(1).Address(0, 0), Target(1).row, "")
strRange = colName & CStr(1) & ":" & colName & CStr(6)
If ctrl Is Nothing Then
GoTo ExecuteSub
End If
On Error GoTo ExitSub
listBoxName = "ListBox" + CStr(Target.Column)
On Error GoTo ExitSub
Set ctrl = ActiveSheet.OLEObjects(listBoxName)
If ctrl Is Nothing Then
GoTo ExitSub
Else
Cancel = True
ctrl.Enabled = True
ctrl.Top = Target.Top + Target.Height
ctrl.Left = Target.Left
ctrl.Visible =True`
Application.EnableEvents = False
right after your Double Click event and see what happens. – K.DᴀᴠɪsCancel = True
in the double-click event procedure? – Variatus