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: 184
Default Copy Autofilter Source Workbook A result in Destination Workbook BSheet1

I need to copy the result from Autofilter on Source Workbook A in
Destination Workbook B Sheet1
My VBA AutoFilter Code is in an external Menu Workbook
..
Sub Import()
Dim fso As Object
Dim Source As Object ' Source Folder path
Dim Dest As Object ' Destination Folder Path
Dim WBA as Object ' Source Workbook
Dim WBB as object ' Destination Workbook
Dim LastRow As Long, Dim Rng As Range
'
Set fso = CreateObject("Scripting.FileSystemObject")
Set Source = fso.GetFolder("P:\Invoices")
WBA = "A.xls"
WBB = "B.xls"
Workbooks.Open Filename:=WBA.Path
On Error GoTo 0
LastRow = Range("B65335").End(xlUp).Row: Range("B2").Select
ActiveSheet.Range("$A$2:$W$65535").AutoFilter Field:=2,
Criteria1:="=Open", Operator:=xlOr, Criteria2:="=Re-Submitted"
'
Set Rng = Range("B2").Resize(LastRow - 1)
Workbooks(WBA.Name).Close False
Workbooks.Open Filename:=WBB.Path
'Syntax problem here
Rng.Copy .....
Workbooks(WBB.Name).Close False
End Sub

Help appreciated
J.P.
 
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
Excel-how to link source workbook to copy of destination workbook D Lynn Excel Worksheet Functions 1 May 29th 08 05:36 PM
HELP: Use the autofilter result on one workbook to filter the next list on another workbook Kathy Houtami Excel Programming 5 September 12th 07 01:15 AM
HELP: Use the autofilter result on one workbook to filter the next list on another workbook Kathy Houtami Excel Worksheet Functions 6 September 11th 07 05:29 AM
How do I post values from source workbook to destination workbook Raghavendra Kulkarni Excel Programming 1 May 4th 05 01:31 PM
how to copy succeeding rows from source workbook to destination w. chris Excel Programming 0 March 8th 05 01:51 PM


All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"