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
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