Error message with AutoFilter

  • Thread starter Thread starter Peter Cloutier
  • Start date Start date
P

Peter Cloutier

When trying to use AutoFilter on a field, I occasionally
get a window that pops up with the warning "Fixed objects
will move" and an OK button. I have to ppress Enter or
click OK quite a few times before the filter action takes
place.
There are no objects such as drawing objects etc in the
sheet within the database.
Anybody know why and how to fix?
Thanks
 
I'd double check.

Hit Edit|goto|special
check Objects

Anything found?

I'm not sure if you can get that warning with invisble shapes, but just in case,
you could run something like this:

Option Explicit
Sub testme()

Dim myShape As Shape
Dim response As Long

For Each myShape In ActiveSheet.Shapes
With myShape
response = MsgBox(prompt:="delete shape at: " _
& .TopLeftCell.Address & vbLf _
& "Visible: " & CBool(.Visible), _
Buttons:=vbYesNoCancel)

If response = vbCancel Then
Exit Sub
Else
If response = vbYes Then
.Delete
End If
End If
End With
Next myShape

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top