Please help with Count
Hi
Have a look at this
Dim cMarks As Shape
Dim Counter As Double
For Each cMarks In ActiveSheet.Shapes
If cMarks.Type = 13 Then
cMarks.Delete
Counter = Counter + 1
End If
Next cMarks
MsgBox "You have removed " & Counter & " check marks in Worksheet '" & _
ActiveSheet.Name & "'."
Regards
Per
"Please Help" skrev i en meddelelse
...
Hello all,
I have a macro to delete the shapes in an active worksheet. After the
shapes are deleted, users will receive a message that they have been
deleted.
In the message, I would like to insert the number of shapes that were
deleted. Can someone help me with counting those deleted shapes?
Below is my current code:
Dim cMarks As Shape
For Each cMarks In ActiveSheet.Shapes
If cMarks.Type = 13 Then cMarks.Delete
Next cMarks
MsgBox "You have removed " & cMarks & " check marks in Worksheet '" &
ActiveSheet.Name & "'."
Thanks.
|