View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
RBLampert RBLampert is offline
external usenet poster
 
Posts: 7
Default Pause a macro for user input

This suggestion (with later correction) works too well. Instead of copying
only the rows selected by the autofilter, it copies them AND every possible
blank row below them, down to row #65,000+. Then I get a "Paste method of
worksheet class failed" error message.

"Don Guillett" wrote:

Untested but try

sub doit()
Selection.AutoFilter Field:=19, Criteria1:="<"
selection.SpecialCells(xlCellTypeVisible).copy
Sheets("E-Mails").Range("A2")
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software