Hi dentler,
first of all make a copy of the file.
I am attaching a macro that will search for objects. Both hidden and miniature ...
If it finds something, it will prompt you to confirm the deletion of the object.
Sub show_all()
Dim a, b, c, d, left_obj, left_col, top_obj, top_row
a = 1
While a > Empty
b = 0
On Error GoTo ch1
ActiveSheet.Shapes(a).Visible = True
On Error GoTo 0
If b = 0 Then
left_obj = ActiveSheet.Shapes(a).Left
left_col = 0
c = 1
While left_col < left_obj
left_col = Columns(c).Left
c = c + 1
Wend
top_obj = ActiveSheet.Shapes(a).Top
top_row = 0
d = 1
While top_row < top_obj
top_row = Rows(d).Top
d = d + 1
Wend
On Error GoTo ch2
If ActiveSheet.Shapes(a).Height < 5 Then
ActiveSheet.Shapes(a).Top = ActiveSheet.Shapes(a).Top - 20 + ActiveSheet.Shapes(a).Height
ActiveSheet.Shapes(a).Height = 20
End If
If ActiveSheet.Shapes(a).Width < 5 Then
ActiveSheet.Shapes(a).Left = ActiveSheet.Shapes(a).Left - 20 + ActiveSheet.Shapes(a).Width
ActiveSheet.Shapes(a).Width = 20
End If
Cells(d + 2, c - 2).Select
Cells(d - 2, c - 2).Select
Cells(d - 1, c - 2).Select
Cells(d - 1, c - 2).Interior.Color = 65535
On Error GoTo 0
challenge = "Delete object? " & ActiveSheet.Shapes(a).Name
challenge = MsgBox(challenge, 4096 + 4, "Object search")
If challenge = 6 Then
ActiveSheet.Shapes(a).Delete
a = a - 1
End If
Cells(d - 1, c - 2).Interior.Pattern = xlNone
Else
MsgBox "end"
Exit Sub
End If
a = a + 1
Wend
Exit Sub
ch1:
b = 1
Resume Next
ch2:
Resume Next
End Sub
m.s.
Bookmarks