Cancel used in that manner means you can never Dble-Clck any cell expecting DbleClcking to work
Exit Sub used that way means the next line will never be executed
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Working with single cell targets means one doesn't need to use Intersect
'Only work on assigned ranges
If Target is Range("C7") Then ShowForm 1, Cancel
If Target is Range("C5") Then ShowForm 2, Cancel
'Alternate, using Intersect
If Not Intersect(Target, Range("C5:C7") is Nothing Then AltShowForm Target Cancel
End Sub
Private Sub ShowForm(FormNum As Long, ByRef Cancel as Boolean)
'ByRef effects Cancel in calling procedure
Cancel = True
If FormNum = 1 then Userform1.Show
If FormNum = 2 then Userform2.Show
End Sub
Private Sub AltShowForm(ByVal Target As Range, ByRef Cancel as Boolean)
If Target Is Range("C6") then Exit Sub 'Cancel is False by default
Cancel = True
'You can only Dbl-Clck a single cell at a time
If Target Is Range("C7") then Userform1.Show
If Target Is Range("C5") then Userform2.Show
End Sub