View Single Post
  #4 (permalink)  
Old 10-14-09, 17:37
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
You're welcome!

If you have a list of names for the files that you will create, make a table of them on a spare worksheet and name it. Then you can use it to create a For Each loop instead:
Code:
Dim rngFiles As Range
Dim x As Cell

set rngFiles = [Workbook].[RangeName]
For Each x in Cell
   Open "C:\Corridor Analysis\" & x.Value &  ".txt" For Output As #1
   Print #1, theclipboard
   Close #1
Next x
Or something like that, anyway.
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote