Thanks so much!
Seth
You have to enclose the procedure name and all the arguments within
apostrophe characters. E.g.,
Application.OnTime Now + TimeSerial(0, 0, 2), " 'BBB 11,22 ' "
This will call procedure BBB passing two numeric arguments, 11 and
22. To pass string arguments, you have to enclose the string
arguments in double quotes:
Application.OnTime Now + TimeSerial(0, 0, 2), _
" 'BBB ""text"", ""text2"" ' "
If you want to pass variables, build up the text string that is
passed to OnTime. E.g,
N1 = 11
N2 = 22
Application.OnTime Now + TimeSerial(0, 0, 2), _
" 'BBB " & N1 & "," & N2 & " ' "
Becareful with the quotes and apostrophes -- it is easy to get them
mismatched.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com ch...@cpearson.com
"Seth" <sdm...@hotmail.com> wrote in message
news:026201c2feff$0d19deb0$a601...@phx.gbl...
Yes, it's possible please try like this... :D
Sub Argumenttest()
Const strMsg As String = "How are you doing?"
Application.OnTime Now, "'TestProc" & Chr$(34) & strMsg & Chr$(34) & "'"
End Sub
Sub TestProc(ByVal str As String)
MsgBox str
End Sub
Colo
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo - VBA guy! of 'The Road of The Cell Masters'
http://www.interq.or.jp/sun/puremis/colo/CellMastersLink.htm
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
"Seth" <sdm...@hotmail.com> wrote in message
news:026201c2feff$0d19deb0$a601...@phx.gbl...
Thanks!!!
Seth
Seth