P
Prema
I have code below to open and process all files in a particular directory. My
code runs in 2007. Files in directory are saved by different users with
various Excel versions.
Somtimes one of the files in the directory is not processed and when I open
the file manually pop up message displays "Excel found unreadable content in
.... Do you wanr to recover the contents of this work book?" If I say yes then
workbook opens.I don't get this message even when I run with display alert
True.
If after manually opening the file and re-save I am able to run my code. Is
there any code I can include to automatically recover or at least display pop
up message as in manual open so that yes button can be used for thr file to
be processed
sales_file_in = "\\gbrcrotpc0ms015\1 To be processed\"
sName = Dir(sales_file_in & "*.*")
' Loop and process all file in sales_file_in directory
Do While sName <> ""
Workbooks.Open Filename:= _
sales_file_in & sName
..
..
more statements
..
..
sName = Dir()
Loop
code runs in 2007. Files in directory are saved by different users with
various Excel versions.
Somtimes one of the files in the directory is not processed and when I open
the file manually pop up message displays "Excel found unreadable content in
.... Do you wanr to recover the contents of this work book?" If I say yes then
workbook opens.I don't get this message even when I run with display alert
True.
If after manually opening the file and re-save I am able to run my code. Is
there any code I can include to automatically recover or at least display pop
up message as in manual open so that yes button can be used for thr file to
be processed
sales_file_in = "\\gbrcrotpc0ms015\1 To be processed\"
sName = Dir(sales_file_in & "*.*")
' Loop and process all file in sales_file_in directory
Do While sName <> ""
Workbooks.Open Filename:= _
sales_file_in & sName
..
..
more statements
..
..
sName = Dir()
Loop