AnsweredAssumed Answered

Sort numbers by its value.

Question asked by Pichaiyan Prabaharan on Jun 19, 2017
Latest reply on Jun 20, 2017 by Ivana Kolin

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