Thread: Pasting
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Pasting

Perhaps this way:

Worksheets(1).Range("A1").CurrentRegion.Resize(,19 ).AutoFilter _
Field:=1, Criteria1:=groups(i1), VisibleDropDown:=False
Worksheets(1).AutoFilter.Range.Copy
Worksheets(2).Activate
Worksheets(2).Cells(currRow, "A").Paste

--
Regards,
Tom Ogilvy


"Raman325" wrote:


Hi,

I'm having a problem copying a range from one sheet and copying it to
the next. To give you an idea of what I'm doing, I have filtered out
results from a spreadsheet and am trying to copy these results to the
next sheet using the following code:


Code:
--------------------
Worksheets(1).Range("A1:S" & Worksheets(1).UsedRange.SpecialCells(xlCellTypeLas tCell).Row).AutoFilter _
Field:=1, Criteria1:=groups(i1), VisibleDropDown:=False
Worksheets(1).Range("A2:S" & Worksheets(1).UsedRange.SpecialCells(xlCellTypeLas tCell).Row).Copy
Worksheets(2).Activate
Worksheets(2).Cells(currRow, "A").Paste
--------------------

(This is part of a bigger macro)

When I run the macro, however, I get that the Object doesn't support
the method. Am I using the wrong method?

Thanks in advance


--
Raman325
------------------------------------------------------------------------
Raman325's Profile: http://www.excelforum.com/member.php...o&userid=24748
View this thread: http://www.excelforum.com/showthread...hreadid=542563