Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arguements in sub procedure

Status
Not open for further replies.

r2000

Programmer
Nov 7, 2003
3
IN
What is the maximum number of arguements that can be passed to a sub procedure
 
As far as I am aware, there isn't a limit.

If there is, you could always get around in by creating a class similar to the parameter class in ADO...

 
Is this homework?

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
59 arguments work OK, 60th gives Too many arguments. :)

Option Explicit

Private Sub test(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, _
arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, _
arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28, arg29, arg30, _
arg31, arg32, arg33, arg34, arg35, arg36, arg37, arg38, arg39, arg40, _
arg41, arg42, arg43, arg44, arg45, arg46, arg47, arg48, arg49, arg50, _
arg51, arg52, arg53, arg54, arg55, arg56, arg57, arg58, arg59 _
)

Beep
End Sub

Private Sub Form_Click()
test 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
0, 0, 0, 0, 0, 0, 0, 0, 0
End Sub
 

Considering your other question, and this one, it surely sounds like a test of some sort.

Besides, ameba, you can actually pass many many more arguments....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top