I'm trying to make a code so that when optionbutton1 is checked, it allows you to right click to select a cell, then right click on a different cell and select that cell as well as the previous cell, etc. Here's What I have so far.
![]()
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Dim S As Range If UserForm3.OptionButton1 = True Then Cancel = True If S Is Nothing Then Set S = Selection End If Application.Union(S, Target).Select End If End Sub
Bookmarks