Private Sub Transfering()
newStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Please be patient this macro is transfering data to the manager files..."
Application.ScreenUpdating = False
Dim Rng As Range
Dim wsD As Worksheet
Set wsD = Workbooks("File Key.xls").Sheets("Input Table")
For Each Rng In wsD.Range("iv2:iv" _
& wsD.Cells(Rows.Count, "iv").End(xlUp).Row)
If Not Rng.Value = vbNullString Then
wsD.Cells.AutoFilter Field:=17, Criteria1:=Rng.Value
wsD.Range("A1").CurrentRegion.Copy
Workbooks.Open Filename:= _
"P:\CET - aa\bb\cc\Test Folder\" & Rng.Value
Sheets("FileData").Select
Range("A1").Select
ActiveSheet.Paste
ActiveWorkbook.Close savechanges:=True
Workbooks("File Key.xls").Activate
Sheets("Input Table").Select
Selection.AutoFilter
End If
Next Rng
Set wsD = Nothing
Application.ScreenUpdating = True
Application.StatusBar = False
Application.DisplayStatusBar = newStatusBar
Sheets("Control").Select
End Sub
Hi I need help with this code It is supposed to: look in column IV and using the cell values filter in column 17. then it supposed to select Current Region A1 and copy it which it does, then it supposed open a file using the cell value in iV for which it has filtered for which it does, then it is supposed to select FileData sheet on that file it has opened and select range a1 which it does, then it is supposed to paste the data which it doesnt. I have followed it set by step. When I open the file using the cell value in IV for which it has filtered it loses the info on the clipboard ( the pasted info) can anyone help !¬!!!
error message
Paste Method of Worksheet Class Failed
Bookmarks