VBA continues before Documents.Open Method Completes
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
VBA continues before Documents.Open Method Completes

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Chris Shoemaker
Guest





Posted: Wed Apr 06, 2005 11:53 pm    Post subject: VBA continues before Documents.Open Method Completes Reply with quote

I'm starting stimple and trying to just open and then close a list of
drawings. What i've noticed however is that vba doesn't wait for the Open
method to complete before continuing with code execution so the program
dies. What's a good way to wait for a file to open, close, save, etc before
continuting with the program? Thanks in advance,

-Chris

--------------------------------------------

For ii = 1 To colFileList.Count

strDwgName = colFileList.Item(ii)

If Dir(strDwgName) <> "" Then
ThisDrawing.Application.Documents.Open strDwgName
ThisDrawing.Close
Else
lstLog.AddItem "Error! " & strDwgName & " Does Not Exist."
End If

Next ii

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB