发布网友 发布时间:2022-04-24 00:57
共2个回答
热心网友 时间:2023-05-17 01:55
Sub CountShapes()
Dim n As Double
Dim ws As Worksheet
Dim Content As String
For Each ws In Worksheets
n = ws.Shapes.Count
Content = Content & "工作表" & ws.Name & " 有" & n & " 个对象" & vbCrLf
Next
MsgBox Content
End Sub
你写错了 呵呵 For Each was In Worksheets 中间的was 改为ws 谢谢
热心网友 时间:2023-05-17 01:56
笔下误~