LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Text file open and close VBA

Hi

I am new to VBA development, I have text file and opening
text file in my VBA to read. After that i want to Add new
line, so i Open it for output mode, (I will create delete
existing and create new file that is ok for me). Here is
my code

Open sXferFile For Output As #1
While Not EOF(1)
Line Input #1, stemp
sFileName = stemp
Line Input #1, stemp
' sProcessDate = CDate(STEMP)
sProcessDate = stemp
Wend
close #1
-- after this
sfnum = freefile
Open sXferFile For Output As #sFnum
write #sfnum, "Over"
close #sfnum


I am getting Path/file error when i open it after closing
text file.

Need help?

Thanks
kalyan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open, Save and close Excel 2007 file with a cmd command Hugo Pinto Excel Discussion (Misc queries) 5 March 3rd 08 10:05 PM
Macro to Open, then Close another File HROBERTSON Excel Discussion (Misc queries) 1 January 8th 07 06:41 PM
Delete/Close Excel file that is kept OPEN Jafer New Users to Excel 0 April 15th 05 05:34 AM
VBA - on a button event, open another closed file, post changes, close file Fio Excel Programming 0 March 1st 04 01:08 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"