Message 1 of 4
Loop is closing more drawings then needed

Not applicable
01-16-2008
08:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have to open up 2 blank drawings sometimes because it will close down additional drawings. In my extract Sub, I do not have any function or anything to close down a drawing. For some reason, it will get to the .close, and close the one drawing right behind it before closing the active drawing. Any ideas of how to fix this error?
~Thanks
For h = 0 To (intListCount - 1)
With Application
.Documents.Open lstElemDwgs.List(h)
Extract_TB_RefBlocks 'Extract Elem Diagrams
.ActiveDocument.Close
End With
Next h
'Reset users SDI mode
Application.ActiveDocument.SetVariable "SDI", PreviousSDIMode
~Thanks
For h = 0 To (intListCount - 1)
With Application
.Documents.Open lstElemDwgs.List(h)
Extract_TB_RefBlocks 'Extract Elem Diagrams
.ActiveDocument.Close
End With
Next h
'Reset users SDI mode
Application.ActiveDocument.SetVariable "SDI", PreviousSDIMode