Hi,
I am using the below coding (this is the part that is causing a problem) to copy specific data from an autofilter to another report.
I am using the below coding (this is the part that is causing a problem) to copy specific data from an autofilter to another report.
Code:
Application.CutCopyMode = 0
Application.CutCopyMode = 0
Application.Wait Now + (TimeValue("00:00:05"))
Range(Range("c65536").End(xlUp), Range("a" & rs)).Copy
Windows(aname).Activate
Sheets("Agent Names").Activate
Range("g1").PasteSpecial xlPasteValues
Range("H1", Range("h65536").End(xlUp)).Copy
Sheets("data").Activate
Range("a65536").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Sheets("Agent Names").Activate
Range("g1", Range("g65536").End(xlUp)).Copy
Sheets("data").Activate
Range("b65536").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Sheets("Agent Names").Activate
Range("i1", Range("i65536").End(xlUp)).Copy
Sheets("data").Activate
Range("c65536").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Sheets("Agent Names").Activate
Range("g1", Range("i65536").End(xlUp)).ClearContents
Sheets("data").Activate
ActiveCell.Offset(0, 3).Activate
Windows(wname).Activate
Application.CutCopyMode = 0
Application.CutCopyMode = 0
Application.Wait Now + (TimeValue("00:00:05"))
Range(Range("ae" & rs), Range("ag65536").End(xlUp)).Copy
[\code]
the coding does not copy just the filtered data, what i mean is if you open a report and filter data and then press the copy button twice it copies all data within the selection and not just the visible cells. How can i get it to guarantee to copy the visible cells only.
thanks in advance
[COLOR=red][b][i][u]Hope this is of use, Rob.[/u][/i][/b][/color][yoda]