|
请教各位老师一个函数嵌套如何赋值问题
请教各位老师一个函数嵌套如何赋值问题
我编了两个函数一个是syy1(a1,a2,a3,a4,a5,b1,b2,b3,b4,b5)。一个是syy2(a,b,c,d)。其中syy1函数里有syy2函数,如何在syy1函数里把a1的值赋给a,把a2的值赋给b,b1的值赋给c,b2的值赋给
d,同样,如何把a3的值赋给a,a4的值赋给b,b3赋给c,b4赋给d,函数格式如下:(这个函数是错误的,不知错在哪里)Public Function syy1(a1 As String, a2 As String, a3 As String, a4 As String, a5 As String, b1 As Integer, b2 As Integer, b3 As Integer, b4 As Integer, b5 As Integer) As String
If a = a1 And b = a2 And c = b1 And d = b2 And (b1 = 1 Or b1 = 0) And (b2 = 1 Or b2 = 0) Then
syy1 = syy2(a, b, c, d)
ElseIf a = a1 And b = a3 And c = b1 And d = b3 And (b1 = 1 Or b1 = 0) And (b3 = 1 Or b3 = 0) Then
syy1 = syy2(a, b, c, d)
ElseIf a = a1 And b = a4 And c = b1 And d = b4 And (b1 = 1 Or b1 = 0) And (b4 = 1 Or b4 = 0) Then
syy1 = syy2(a, b, c, d)
ElseIf a = a3 And b = a4 And c = b3 And d = b4 And (b3 = 1 Or b3 = 0) And (b4 = 1 Or b4 = 0) Then
syy1 = syy2(a, b, c, d)
Else
Syy1 = "8"
End If
End Function
(其中a,b,a1,a2,a3,a4,a5都是String)(c,d,b1,b2,b3,b4,b5都是Integer
)拜托各位老师修改错误。
zyx917.rar
(15.94 KB, 下载次数: 228)
zyx917.rar
(15.94 KB, 下载次数: 171)
|
|