weather
04-07-2015, 12:24 PM
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.
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.