Hi Mandeep,
Thanks for the response, I have tried that and getting same result and I cannot 
give predefined rows range since these are filtered out during run time.


Regards.
Yours Sincerely,Nitin Balodi

Date: Mon, 18 May 2015 04:10:25 -0700
From: rockerna...@gmail.com
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Re: VBA Error in copying filtered rows

Assign sheet names while defining a range to be copied. means you should use 
Sheet("Name").range("A1:A100") instead of Only Range and send me the snapshot 
of error. 
Regards, Mandeep baluja 

On Monday, May 18, 2015 at 4:31:22 PM UTC+5:30, Nitin Balodi wrote:


Hi Champs,
I am getting error in copying filetered cells. Below is the code snippet. Point 
to note is this works well when I test this code by running step-by-step (i.e. 
by using F8 key) but when run as a complete code it gives me an error:

Sheets(2).ActivateActiveSheet.Range("$A$1:$S$1").AutoFilter Field:=19, 
Criteria1:="N/A"ActiveSheet.Range("$A$1:$S$1").AutoFilter Field:=10, 
Criteria1:=Array("4-Resolved", "5-Closed", "6-Cancelled"), 
Operator:=xlFilterValuesIf 
ActiveSheet.UsedRange.Columns(1).SpecialCells(xlCellTypeVisible).Count - 1 = 0 
Then GoTo ErrorMessageCode
Range("A1").SelectRange("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy
Sheets(3).ActivateActiveSheet.Paste
Can you help me on this.
Thanks and Regards.
Yours Sincerely,Nitin Balodi                                      





-- 

Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

 

FORUM RULES

 

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5) Jobs posting is not allowed.

6) Sharing copyrighted material and their links is not allowed.

 

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.

--- 

You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.

To post to this group, send email to excel-macros@googlegroups.com.

Visit this group at http://groups.google.com/group/excel-macros.

For more options, visit https://groups.google.com/d/optout.

                                          

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to