LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fustration Help? Filter, Visible Copy/Paste


I have struggled for a couple of weeks with AutoFilter and the coping
and pasting of VISIBLE cells only to a different worksheet.

I continually get a crash on the paste method. I suspect that the
crash is caused during the copy but is delayed until the paste. When I
step through the code the copy works but I notice two "marching ants"
areas. One area is the AutoFilter itself and the other area is the
visible data. The paste puts the visible data into the new worksheet
then crashes. The AutoFilter area is not pasted but still both areas
have the “marching ants”.

The data starts on row 8 with the following filter on row seven:
Selection.AutoFilter Field:=13, Criteria1:="12/31/2004",
Operator:=xlAnd _
, Criteria2:="<7/1/2005"

The filter's Critera1 seems to work even though the cells have data
like "1/9/2005 10:15:00 AM in them. Criteria2 seems to be ignored.

I have written loops, tried the visible cell types with no luck.
Select, resizing the range, paste. paste special...nothing is working
for me.

----Selection.SpecialCells(xlCellTypeVisible).Select
----Selection.SpecialCells(xlCellTypeVisible).Copy

The paste fails with "paste method of worksheet class failed".
"ActiveSheet.Paste" or Worksheets("Datadown").Range(srceRng).Copy
"Destination:=Worksheets("2005").Range(srceRng )" both have the same
result.

“With ActiveSheet.AutoFilter.Range” gives me an “Application defined or
object defined error.”

-----------------------------------------------------------
I have tried so many permutations that I cannot keep them straight.

Would some kind sole help me find sanity again with a code example that
I can learn from?

Respectfully, Craigm


--
Craigm
------------------------------------------------------------------------
Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381
View this thread: http://www.excelforum.com/showthread...hreadid=387968

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows and paste onto visible only rk0909 Excel Discussion (Misc queries) 2 April 7th 10 03:05 AM
Copy and paste VISIBLE data Jaytee Excel Discussion (Misc queries) 3 November 1st 08 09:13 PM
Copy only visible cells after filter is applied/ sum after filter MAM Excel Worksheet Functions 0 April 9th 08 04:09 AM
Copy/Paste Visible cells only Ashley Excel Discussion (Misc queries) 1 October 17th 06 09:17 PM
copy and paste visible columns ferde Excel Discussion (Misc queries) 1 December 8th 05 08:42 AM


All times are GMT +1. The time now is 12:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"