欢迎加我的QQ群:193522571,一起来讨论、交流!

AutoCAD.Net/C#.Net QQ群:193522571 EXCEL VBA判断哪些sheets被选中了

 

 

Sub xuan()
Dim sht As Worksheet
For Each sht In ActiveWindow.SelectedSheets
    If sht.Name = "Sheet4" Then MsgBox "选中了": Exit Sub
Next sht
MsgBox "没选中"
Set sht = Nothing
End Sub

posted @ 2019-12-17 15:42  swtool  阅读(224)  评论(0编辑  收藏  举报
欢迎加我的QQ群:193522571,一起来讨论、交流!