3 Replies Latest reply on Dec 11, 2017 7:26 AM by David Watkins

    understanding VBA  dim and set

    David Watkins

      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