请教大神怎么将两个判断的sub连接起来
PrivateSubWorksheet_Change(ByValTargetAsRange)IfTarget.Address="$F$6"AndTarget.Value<...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$6" And Target.Value <> "" Then
Sheet6.Visible = 1
Else
Sheet6.Visible = 0
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$7" And Target.Value <> "" Then
Sheet7.Visible = 1
Else
Sheet7.Visible = 0
End If
End Sub
请教大神要怎么把这两个sub连接起来,两个执行的时候互不影响 展开
If Target.Address = "$F$6" And Target.Value <> "" Then
Sheet6.Visible = 1
Else
Sheet6.Visible = 0
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$7" And Target.Value <> "" Then
Sheet7.Visible = 1
Else
Sheet7.Visible = 0
End If
End Sub
请教大神要怎么把这两个sub连接起来,两个执行的时候互不影响 展开
2个回答
展开全部
Private Sub Worksheet_Change(ByVal Target As Range)
If (Target.Address = "$F$6" And Target.Value <> "") or (Target.Address = "$F$7" And Target.Value <> "") Then
Sheet7.Visible = 1
Else
Sheet7.Visible = 0
End If
End Sub
If (Target.Address = "$F$6" And Target.Value <> "") or (Target.Address = "$F$7" And Target.Value <> "") Then
Sheet7.Visible = 1
Else
Sheet7.Visible = 0
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询