View Single Post
  #4   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

Use a public variable to pass the parameter

Public MyParameter As String
Sub test()
MyParameter = "abc"
Application.OnTime Now + TimeValue("00:00:5"), "my_Procedure"

End Sub

Sub my_Procedure()

MsgBox (MyParameter)

End Sub



" wrote:

Joel, Esq.,

Thank you for responding to the query.

Would like to have called the Sub as if bearing the effects of,

Call CentrAcroSelection(TitleWrap)

Needless to say, TitleWrap is an argument to be processed by the Sub,
CentrAcroSelection.

However, the syntax of OnTime method (shown above) prevents the
assignment of TitleWrap to CentrAcroSelection as it is.

Please extend a helping hand.

Regards.