View Single Post
  #5   Report Post  
davez
 
Posts: n/a
Default


here is the completed code adapted for my purposes of course -

Sub copyPasteToMultiples()
Dim myDir As String
Dim myFile As String
Dim ws As Worksheet

Application.ScreenUpdating = False

myDir = "C:\test\" 'Where the files are
myFile = Dir(myDir & "*.xls") 'Find the first .xls file
Do While myFile < ""
Workbooks("new_rtgs.xls").Worksheets(1).Range("V1: DK30").copy
Workbooks.Open (myDir & myFile)
For Each ws In ActiveWorkbook.Worksheets
ws.Range("V1").PasteSpecial
Next ws
ActiveWorkbook.Close -1
myFile = Dir 'Find the next file
Loop
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub


--
davez
------------------------------------------------------------------------
davez's Profile: http://www.excelforum.com/member.php...o&userid=16685
View this thread: http://www.excelforum.com/showthread...hreadid=399344