-
2nd time a freefile is opened, exception is thrown
I have created this VBA module associated with a worksheet named "Notes" The first time it runs, a file is written to this directory: "C:\Users\weather\Documents\Outlook Files\" & strTitle & ".txt" The filename is NoteBody.txt
The second time through the loop an exception is thrown at this line: Open strTitle For Output As #intFileNo with the following error:
Microsoft Visual Basic
Run-time error '52':
Bad file name or number
When the exception is thrown the value of intFileNo has incremented to 2.
I think the fix is going to be pretty simple. It has been years since I did any VBA coding. Your help would be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules