Home > Software engineering >  Questions about the son call process with an array of parameters
Questions about the son call process with an array of parameters

Time:11-02

Extract the multi-line text in a text box, as follows:
Civil 10
Electric 4
Plumbing 8
The main process of extracting "civil" 10, the sub-processes "civil 10" extraction "civil" and "10"
Procedure is as follows:
 Private Sub command_Click () 
Dim s1, s2, a, b, n2, s () As String
Dim I, j, h As Integer
S1=wz. Text
S2=""
S=Split (s1, vbCrLf)
For I=0 To UBound (s)
S (I)=Trim (s (I))
If Len (s) (I) & gt; 0 Then
Call sz (a, s)
Call wb (b, s)
.


Private Sub sz (ByVal l1, r1 () As String)
Dim n1 As String
Dim m1 As Integer
For m1=1 To Len (r1 ())
N1=Right (r1 (), m1)
If IsNumeric (n1)=True Then
L1=n1
End the If
Next the m1
End Sub

Run after tip compile error: assignment request variables - for the expression, which help to give directions,

CodePudding user response:

N1 (r1=Right () ,
m1)
Red ku number error, do not need to

CodePudding user response:

Program execution To this For m1=1 To Len (r1 ()) errors, and remove the r1 () brackets also prompt the same error

CodePudding user response:

Private Sub sz (ByVal l1, r1 As String

N1=Right (r1, m1)

CodePudding user response:

So, execute to call sz (a, s), the prompt byref parameter type, the s here is an array type, and r1 is character, affirmation incorrect parameter passing, pleaded with expert advice,

CodePudding user response:

 
'here, add red position, remove the blue location
If Len (s) (I) & gt; 0 Then
Call sz (a, s (I)
Call wb (b, s)
.


Private Sub sz (ByVal l1, r1 ()
As a String)Dim n1 As String
Dim m1 As Integer
For m1=1 To Len (r1 ()
N1 (r1=Right () ,
m1)If IsNumeric (n1)=True Then
L1=n1
End the If
Next the m1

CodePudding user response:

So, execute to call sz (a, s), the prompt byref parameter type, the s here is an array type, and r1 is character, affirmation incorrect parameter passing, pleaded with expert advice,

Ah, where your command_Click calls, of course, also to the corresponding change, the character to come over,

I look at your sz function is to handle a string, that is so complicated

CodePudding user response:


'here, add red position, remove the blue location
If Len (s) (I) & gt; 0 Then
Call sz (a, s (I)
Call wb (b, s)
.


Private Sub sz (ByVal l1, r1 ()
As a String)Dim n1 As String
Dim m1 As Integer
For m1=1 To Len (r1 ()
N1 (r1=Right () ,
m1)If IsNumeric (n1)=True Then
L1=n1
End the If
Next the m1

CodePudding user response:

Upstairs program input this paragraph Call sz (a, s) Hint, the lack of list separators or),
Exclude pleas

CodePudding user response:

Now I don't understand is, call the subprocesses r1 () array parameters how to set up, get s array parameter passed to the r1 (),

CodePudding user response:

How no one answer my question?

CodePudding user response:

5/7 floor has answered your question!
According to the prompt change the original code, don't copy return code,

CodePudding user response:

I didn't understand fifth floor "s) "This is what mean?
According to the 7th floor said I made, errors,

CodePudding user response:

I don't seem to learn the language,


7 f has said very clearly,
  •  Tags:  
  • VBA
  • Related