Excel 2007 - Autofilter - copy visible cells in columns - working in 2003 problem in 2007

Ralph[1980PL]

New Member
Joined
Feb 20, 2010
Messages
1
Hi All,

I went through the threads and I couldn't find the solution which could be helpful so...maybe someone;P will be able to find the way how to deal with the issue I encountered when I switched from excel 2003 to 2007.

Macro is located in workbook 1 and it opens another one (workbook 2) where it should auto filter data in some columns and then copy particular columns and paste them (only visible cells) in the workbook 1. Sounds very simple but...it's not:P. When I was using excel 2003 it worked smoothly but now the values which I get are blanks:(. In Debug mode I can't find any issue. Before you ask me;)...the autofilter code works fine because in other part of the macro in which it calculates the number of visible cells it gives correct values.

This is the code for copy paste.:

'copy from 8th column
xlApp.Worksheets("Main").AutoFilter.Range.Columns(8).SpecialCells(xlCellTypeVisible).Select
xlApp.Worksheets("Main").AutoFilter.Range.Columns(8).SpecialCells(xlCellTypeVisible).Copy
'paste in 1st column starting with A1
Worksheets("TEMP").Activate
Worksheets("TEMP").Range("A1").Select
Worksheets("TEMP").Paste

I will be really grateful if you could help me with this one.

Thanks in advance:)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Ralph

You should avoid using Select/Activate, you might also want to look at using Advanced Filter rather than AutoFilter.:)
 
Upvote 0

Forum statistics

Threads
1,215,488
Messages
6,125,092
Members
449,206
Latest member
ralemanygarcia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top