Tôi có file ex, gồm 100 sheet, trên mỗi sheet có một píc đều có tên là chuky tôi muốn đếm số pic có tên chuky trong file này thì làm sao. Nhờ các ACE giúp. Xin cảm ơn.
Sub dem_pic()
Dim sSheet As Worksheet, t&
Dim sShapes As Shape
t = 0
With ActiveWorkbook
For Each sSheet In Sheets
For Each sShapes In sSheet.Shapes
If sShapes.Name = "chuky" Then
t = t + 1
End If
Next sShapes
Next sSheet
End With
MsgBox "Workbook có : " & t & " picture voi tên chuky.", vbInformation, "Thông báo"
End Sub