I am modifying the code and I use Type. VBA says that there is error. Any suggestion why it happens?
User defined types must be declared at the top of your module, before any procedures or functions.
What SW version are you running this macro on? And what is the macro supposed to do?
In the code below getInformation requires you to pass the component object. It seems to work if you change it to getInformation swComponent
For Each vComponent In allComponentsOutsideFolders(swAssy)
Set swComponent = vComponent
If Not swComponent Is Nothing Then
Vendor = getVendorStringFromComponent(swComponent)
I run this macro on 2017. I copied the macro online and modify the code. It supports to sort the assembly tree
The problem is "User-defined type not defined". Any clue?
Jim is right. That "Option Explicit" statement is why you must.
Retrieving data ...