On 2002-04-19 06:44, Tommy Bak wrote:
Hi verluc.
I've changed your macro a couple of places.
Now it seems to run well.

Sub Filter()
currentworkbook = ActiveWorkbook.Name
currentsheet = ActiveSheet.Name
Columns("L:L").Select
Selection.AutoFilter Field:=1, Criteria1:="1"
Set kopi = Range("A5:" & Range("K65536").End(xlUp).Address)
Workbooks.OpenText Filename:="G:Mijn documentenMap1.xls"
Cells.Clear
kopi.Copy
Range("A5").Select
ActiveSheet.Paste
Workbooks(currentworkbook).Worksheets(currentsheet).Activate
Selection.AutoFilter
Range("A1").Select
End Sub
Great Tommy,now it works all.
Many,Many thanks