|
>Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
> If Target.Row Mod 4 <> 1 Then Exit Sub
> If Intersect(Target, Columns("A:F")) Is Nothing Then Exit Sub
> UserForm1.Show
> Cancel = True
>End Sub
単純にこの文を改変するとこうなったポヨ
目的がわからんから元が適正かは知らんポヨ
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Row Mod 4 <> 1 Then Exit and _
Intersect(Target, Columns("A:F")) Is Nothing Then
UserForm2.Show
else
UserForm1.Show
Cancel = True
end if
End Sub
|
|