View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Re : Excel To Call Sub and Assign Arguments

You can make the public variable an array like

Public arg(5) as Variant

Sub Main()

arg(0) = "Hello"
arg(1) = "World"
arg(2) = "Goodbye"
arg(3) = "Joel"
arg(4) = 123
Application.OnTime Now + TimeValue("00:00:5"), "my_Procedure"

End Sub

Sub my_Procedure()

'enter yor code here

End Sub


The above example is very similar to the way Unix, and C language pass
parameters except instead of make the vaiable Publid the variable are pushed
onto a calling stack.


" wrote:

Joel, Esq.,

Thank you again.

"Use a Public Variable" ; that's a viable means indeed.

There appears to be no alternative means (good try aside, but in vain)
to daisy-chain arguments to the following statement,

Application.OnTime Now + TimeValue("00:00:5"), "my_Procedure" & <Daisy-
Chain of Arguments

Regards.