View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Losse[_25_] Losse[_25_] is offline
external usenet poster
 
Posts: 1
Default Using "i" in File Names


I did:

For i = 1 To 30
Workbooks.Open Filename:="out13_T600K_" & i & "per2000.dat"
ActiveSheet.Name = "600"
sheets.Add
ActiveSheet.Name = "300"
sheets.Add
ActiveSheet.Name = "900"
Workbooks.Open Filename:="out13_T300K_" & i & "per2000.dat"
Workbooks.Open Filename:="out13_T900K_" & i & "per2000.dat"
Workbooks("out13_T900K_" & i & "per2000.dat").sheets("out13_T900K_" & i
& "per2000").Range("A:B").Copy _
Destination:=Workbooks("out13_T600K_" & i &
"per2000").sheets("900").Range("A:B")
Workbooks("out13_T300K_" & i & "per2000.dat").sheets("out13_T300K_" & i
& "per2000").Range("A:B").Copy _
Destination:=Workbooks("out13_T600K_" & i &
"per2000").sheets("300").Range("A:B")
Next i
End Sub

and it works fine. I just need it to insert the tab/space between the
columns when it opens it.


--
Losse
------------------------------------------------------------------------
Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813
View this thread: http://www.excelforum.com/showthread...hreadid=388024