Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: How to unload all userforms when opening a new file?

$
0
0

[quote user="quasi_modo"]Is there a way to force all userforms to unload when the operator opens a new file?[/quote]

First, write a class that handles the OnDesignFileClosed event.  That would be the time to clean up UserForms.

Next, write something to close the open UserForms.  You need to iterate the forms collection.  I think you can do something like this...

Dim Obj As Object

For Each Obj In VBA.UserForms
  Debug.Print Obj.name
  End If
Next Obj

Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>