davidmyers
Board Regular
- Joined
- Jan 29, 2017
- Messages
- 88
- Office Version
- 2016
- Platform
- Windows
Hi, I have a userform which opens when I double click a cell
My problem is that the userform has a listbox, and if I click on a cell that's in the area that the userform will occupy then the double click that opens the userform also selects an item in the listbox.
How can I stop this happening?
Thanks for any help
David
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("G2:G501")) Is Nothing Then
Cancel = True
UserForm1.Show
End If
End Sub
My problem is that the userform has a listbox, and if I click on a cell that's in the area that the userform will occupy then the double click that opens the userform also selects an item in the listbox.
How can I stop this happening?
Thanks for any help
David
Last edited: