|
在网上找的组合程序,修改了一下
Function NFormM(ByVal iStar As Integer, iEnd As Integer, Num As Integer, Optional StrAll As String)
Dim i, j, k As Integer
Dim W1(14), W2(14), W3(14) As String
If Num = 0 Then
Me.Text30 = Me.Text30 & StrAll & vbCrLf
Else
k = 0
For j = 1 To 14
W1(j) = ""
W1(j) = Nz(Me.Controls("W1" & Format(j, "00")), "N")
W2(j) = ""
W2(j) = Nz(Me.Controls("W2" & Format(j, "00")), "N")
If W1(j) = "N" Then
k = k + 1
If W2(j) <> "N" Then
W3(k) = W2(j)
End If
Else
k = k + 1
W3(k) = W1(j)
End If
Next j
For i = iStar To iEnd
DoEvents
NFormM i + 1, iEnd, Num - 1, StrAll & W3(i) & " - "
Next i
End If
End Function
但还是没解决空格和必选项的问题 |
|