0% found this document useful (0 votes)
5 views1 page

OS. User Type Not Defined

OS. to Test Your Macro

Uploaded by

Francis Cayanan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

OS. User Type Not Defined

OS. to Test Your Macro

Uploaded by

Francis Cayanan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

OS.

User Type Not Defined


The message may be appearing because the OpenSTAAD library references have not been included. The VBA compiler therefore does not know which func ons are associated with the OpenSTAAD object.

There are two ways to eliminate this error message:

1. Declare the OpenSTAAD object As Object, instead of As Output, e.g.


Copy to clipboard
Dim objOpenSTAAD As Object

2. Include the OpenSTAAD library reference in your VBA editor. This second op on has the added benefit that once you do it, the compiler will now recognize the OpenSTAAD object and will pop up a list of func ons whenever you refer to the
object in your VBA editor.

To include the OpenSTAAD library reference, select Tools > References in your VBA editor. A dialog tled References – Normalopens. You will see a scroll box inside the dialog box labeled Available References. Scroll down through the list of references un l you find and
entry labeled OpenSTAAD 1.0 Type Library. Toggle on the corresponding check box, then click OK.

Now re-run your macro to see if the problem with the User Defined type not defined error message has been solved.

You might also like