Listing all possible combination without repetition,VBA
问题 I have a code that work right now and lists numbers at 6 lenght.But they are repetive.But these numbers are repeated.I need unique non-repeated 6 digit. I have this kind of results right now.1 1 1 3 4 6 but i need different and non repeating results.Thank you for helping me. Sub AllCombinations() Dim nums(): nums = Array(1, 2, 3, 4, 5, 6, 7, 8, 9) Dim arValues(999999, 5) Dim n1 As Integer, n2 As Integer, n3 As Integer, n4 As Integer, n5 As Integer, n6 As Integer, x As Long For n1 = 0 To