|
- Public Answer$
- Sub ManualFinish_Click()
- Dim st$, i&, j&, arr, brr&(), num&
- arr = [a1].Resize(9, 9)
-
- For i = 1 To 9
- For j = 1 To 9
- If arr(i, j) = "" Then st = st & "0" Else st = st & CStr(arr(i, j))
- Next
- Next
-
- num = StartNew(st)
- If num = 1 Then
- ReDim brr(0 To 8, 0 To 8)
- For i = 0 To 80
- X = Int(i / 9)
- Y = i Mod 9
- brr(X, Y) = Mid(Answer, i + 1, 1)
- Next
- [m1].Resize(9, 9) = brr
- Else
- MsgBox "无解或多解"
- End If
- End Sub
- Function StartNew(ByVal gGame$)
- Dim sol As dlx_solver
- Set sol = New dlx_solver
-
- StartNew = sol.Solve(gGame, Answer, True)
- End Function
复制代码 http://club.excelhome.net/thread-1433335-1-1.html
从中 剥离出部分功能
hello.rar
(27.16 KB, 下载次数: 4)
|
评分
-
1
查看全部评分
-
|