6 Replies Latest reply on Jun 20, 2017 5:36 AM by Ivana Kolin

    Sort numbers by its value.

    Prabaharan Pichaiyan

      I have output of 4 numbers. I need to sort those number by maximum to minimum.


      for example.


      Sub main()

      Set swApp = Application.SldWorks

      Dim objecta As Double

      Dim objectb As Double

      Dim objectc As Double

      Dim objectd As Double


      Dim a As Double

      Dim b As Double

      Dim c As Double

      Dim d As Double


      objecta = 55

      objectb= 60

      objectc= 58

      objectd = 20


      Debug.Print a, b, c, d

      End Sub


      I need to assign maximum value to "a" and minimum value to "d" vise versa.


      I know its simple question. I am new to VB programming.

      Thank you