View Single Post
  #2 (permalink)  
Old 10-12-09, 10:43
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
Point 1 - the Excel application object has a property DisplayAlerts. Set this to False before the line of code to close the file, and True just after. This will suppress the "Save changes?" prompt.

Point 2 - you'll need to use a loop and a counter:
Code:
intCount = 1
Do Until [test that no more files need to be created]
   Open "C:\Corridor Analysis\" & right("000" & intCount, 3) &  ".txt" For Output As #1
   Print #1, theclipboard
   Close #1
   intCount = intCount + 1
Loop
Good luck!
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote