ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "file available for read/write" message (https://www.excelbanter.com/excel-programming/300395-file-available-read-write-message.html)

MikeP

"file available for read/write" message
 
My thanks to anyone who reads and replies to this

I have written a macro which does a number of things:

1) Writes a number of script files for a third party software product
2) Writes a .bat file to execute the scripts
3) Loops until the resulting output files are found
4) Imports the files (text files
5) Copies the required data into my spreadsheet
6) Closes the txt files (SaveChanges = False

The problem I have is that when the macro completes, a few seconds later, an Excel popup proclaims "The file "####.txt" is available for read/write" for each of the txt files previously imported and closed

Why? and, how can I prevent this happening

Thanks again.

Nigel

"file available for read/write" message
 
MikeP,
Is it an Excel popup or your 3rd party speaking?

Think you going to have to send the code along for further assistance on
this one.

Cheers
Nigel

"MikeP" wrote in message
...
My thanks to anyone who reads and replies to this.

I have written a macro which does a number of things:-

1) Writes a number of script files for a third party software product.
2) Writes a .bat file to execute the scripts.
3) Loops until the resulting output files are found.
4) Imports the files (text files)
5) Copies the required data into my spreadsheet.
6) Closes the txt files (SaveChanges = False)

The problem I have is that when the macro completes, a few seconds later,

an Excel popup proclaims "The file "####.txt" is available for read/write"
for each of the txt files previously imported and closed.

Why? and, how can I prevent this happening?

Thanks again.




MikeP

"file available for read/write" message
 
Nigel

It's an Excel pop-up for "file reservation". I can't type all the code in as it's a work based script but in the most succinct nutshell I can muster, the script goes something like:

Check dir for scripts/txts/bats and kill
Print worksheets 1-7 as script file
Print command line to execute scripts as bat fil
ReturnVal shell = .bat fil
Do loop until resulting txt files are found - exit if counter 500
Workbooks.OpenText resulting text file
Copy required cells to output page of main workboo
Close text file
Save workbook

I hope that's enough info and thanks for the reply
Save active workboo



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com