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: 33
Default this macro runs, but not with a filter on the sheets?

Hi guys, this macro copies sheets from one workbook to another
depending on criteria

If i run the macro when the originals sheets have a autofilter that
filters all non blanks, it gives a problem. I want him to copy the
sheets as values, so without the filter...

The problem is in the last part :" Cells.PasteSpecial xlPasteValues"!!!


If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report
RSU").Range("a4").Value Then
If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report
ESPP").Range("a3").Value Then
If Sheets("Report Option Plan").Range("a5").Value =
Sheets("Report F Shares").Range("a3").Value Then
Sheets(Array("Overview", "Report Option Plan", "Report RSU",
"Report ESPP", "Report F Shares")).Copy
Else
Sheets(Array("Overview", "Report Option Plan", "Report RSU",
"Report ESPP")).Copy
End If
Else
If Sheets("Report Option Plan").Range("a5").Value =
Sheets("Report F Shares").Range("a3").Value Then
Sheets(Array("Overview", "Report Option Plan", "Report RSU",
"Report F Shares")).Copy
Else
Sheets(Array("Overview", "Report Option Plan", "Report
RSU")).Copy
End If
End If
Else
If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report
ESPP").Range("a3").Value Then
If Sheets("Report Option Plan").Range("a5").Value = Sheets("Report
F Shares").Range("a3").Value Then
Sheets(Array("Overview", "Report Option Plan", "Report ESPP",
"Report F Shares")).Copy
Else
Sheets(Array("Overview", "Report Option Plan", "Report
ESPP")).Copy
End If
Else
Sheets(Array("Overview", "Report Option Plan", "Report F
Shares")).Copy
End If
End If

Worksheets.Select
Cells.Copy
Cells.PasteSpecial xlPasteValues
Worksheets(1).Buttons.Delete
Cells(1).Select
Worksheets(1).Select
Application.CutCopyMode = False

 
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
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
One macro runs then it auto runs another macro PG Excel Discussion (Misc queries) 2 September 1st 06 09:30 PM
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? StargateFanFromWork[_3_] Excel Programming 6 January 26th 06 06:31 PM
Unprotecting 4 sheets before "WorkbookOpen" macro runs kcdonaldson Excel Discussion (Misc queries) 1 December 7th 05 02:21 PM
macro to filter sheets emisenas Excel Programming 0 October 1st 04 03:07 AM


All times are GMT +1. The time now is 08:34 AM.

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"