update file by DDE
you may want to throw in an Application.Calculate just before the DoEvents
--
Regards,
Tom Ogilvy
"asburypark98" wrote:
On 12 Feb, 16:36, Tom Ogilvy
wrote:
Sub verification()
Dim sPath As String
Dim File As String
sPath = "C:\Files\"
arrFiles = Array("Alfa", "Beta")
For i = 0 To 1
sFile = Dir(sPath & arrFiles(i) & "*.xls")
Workbooks.Open (sPath & arrFiles(i))
Set WB = ActiveWorkbook
LinkList
wb.Close SaveChanges:=True
Next i
End Sub
--
Regards,
Tom Ogilvy
Hi Tom,
if I insert WB.Close SaveChanges:=True,
macro runs and opens the first
file and puts it into LinkList, starts the
update and opens the second file, starts the update
and then saves both the files without the new data because
there wasn't enough time to complete the update before
the saving, I think.
Thank a lot Tom,
d.
|