View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
targante targante is offline
external usenet poster
 
Posts: 3
Default Code Doesn't Wait!

Window NT; Excel 97
1. I have a VBA procedure that uses DOS to create a directory listing file,
then it accesses the file. But, the code "beats" DOS, and tries to access
the file before DOS finishes creating it.
How do I get the code to wait for DOS to finish?

2. This same dilemma applies to having a VBA procedure open a workbook,
execute several actions, then close the file. The procedure beats itself and
closes the workbook before it's finished making the changes.
How do I get the code to wait for itself to finish before closing?

Thanks,
Trent Argante
[TPA.J(67)]