ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
DWDavid Watkins08/12/2017

I have pieced together meany things in VBA over the years but something I never understand is how Dim and Set work and what there really doing. I think I get it some times but I don't really understand what I have below. I just know it works. Could someone help explain this to me?

    Dim swApp    As SldWorks.SldWorks

    Dim swModel  As SldWorks.ModelDoc2

    Set swApp = Application.SldWorks

    Set swModel = swApp.ActiveDoc

Thanks for any help with this.

David