How to solve Error 2023 for Excel?

E

Eric

Re-post Question

I run two excel applications separately, because I get 2 CPUs for my
computer, and assign each excel application for each CPU. Both excel
applications will be opened, save and closed a list of files one by one at
the same time, and all files are referred to Data.xls for retrieving data.
Both application run simultaneously, in the middle of process, one of excel
application stops and pop up an error on macro as show below

1) Loop While x <> y
I receive Error 2023 on x variable

2) date from Data file could be retrieved by other application at the same
time, so I set the displayalert to be false, but DisplayAlerts is still pop
up for locating the Data file, any suggestions on what cause this problem?

Does anyone have any suggestions on what cause this problem and how to solve
it?
Thank for any suggestions
Eric

-------------------------------------------------------------------------------------
Application.DisplayAlerts = False
{Retrieve the latest date in cell A2 from file Data.xls}
x = TheValue("E:\Files", "Data.xls", "Records", "A2")

[Repeated codes - start]
Do
{Summary file must be opened at least once}
Workbooks.Open Filename:="E:\Files\Summary.xls", UpdateLinks:=3
Workbooks("Summary.xls").Close savechanges:=True
{Retrieve the last updated date in cell A591 from file Summary.xls}
y = TheValue("E:\Files", "Summary.xls", "Records", "A591")
{If the date is different between Data and Summary files, then redo this
step again}
Loop While x <> y
[Repeated codes - end]

{This repeated codes will be duplicated 64 times for different files to be
updated for one excel application, and there are two excel applications run
the same process simultaneously for different lists of files}
-------------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top