View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mafunzalo Mafunzalo is offline
external usenet poster
 
Posts: 2
Default A macro that copies and pastes autofiltered cells will fail.

Take a spreadsheet with data. Start recording a macro. Autofilter some of
the cells. Copy all of the cells of the spreadsheet. Paste the cells into an
empty spreadsheet. Go back to the first spreadsheet and turn off autofilter.
Turn off the macro.

Delete the contents of the second spreadsheet. Go back to the first
spreadsheet and try to run the macro. The macro will run but the second
spreadsheet will not be filled. The command, "ActiveSheet.paste" will not be
present in the macro. If you add the command. the macro will halt with a
1004 error.