|
这个我不敢测试,怕卡住了。
- Sub text()
- Dim Fso As Object, Ostream As Object
- Dim txtName As String
- Set Fso = CreateObject("Scripting.FileSystemObject")
- txtName = ThisWorkbook.Path & "\组合列表.txt"
- Set Ostream = Fso.CreateTextFile(Filename:=txtName, overwrite:=True)
- Dim a%, b%, c%, d%, e%, f%, g%, h%, xStr As String
- For a = 1 To 15: For b = 1 To 15: For c = 1 To 15: For d = 1 To 15: For e = 1 To 15: For f = 1 To 15: For g = 1 To 15: For h = 1 To 15
- If b <> a And c <> a And c <> b And d <> a And d <> b And d <> c And e <> a And e <> b And e <> c And e <> d And _
- f <> a And f <> b And f <> c And f <> d And f <> e And g <> a And g <> b And g <> c And g <> d And g <> e And g <> f _
- And h <> a And h <> b And h <> c And h <> d And h <> e And h <> f And h <> g Then
- xStr = "0、" & a & "、" & b & "、" & c & "、" & d & "、" & e & "、" & f & "、" & g & "、" & h
- Ostream.WriteLine xStr
- End If
- Next h, g, f, e, d, c, b, a
- Set Ostream = Nothing
- Set Fso = Nothin
- End Sub
复制代码 |
|