PDA

View Full Version : [SLEEPER:] OnTime Problem ..?



Willer
06-02-2012, 08:21 AM
Hi I'm New to this Forum..:hi: So please forgive, if my Etiquette is below par :dunno

After 3Secs(Parameter Passed) I get the error..
"The Macro ....Personal.XLS'!'InfoHide'' cannot be found

Calling This Code from another .XLS (Sub) ..!

Call Personal_XLS.ThisWorkbook.InfoShow("00:00:03", "From TimeSheet")

Personal.XLS (Module)


Public Sub InfoShow(T As String, Optional S As String = "No Data")
RunWhen = Now + TimeValue(T)
InfoBox.Caption = T
Application.OnTime RunWhen, "'InfoHide'", , True
InfoBox.Info.Caption = S
InfoBox.Show
End Sub

Public Sub InfoHide()
InfoBox.Hide
Application.OnTime RunWhen, "InfoHide", , False
End Sub


Can anyone see what i'm Missing..? : pray2:

Bob Phillips
06-02-2012, 10:08 AM
Public Sub InfoShow(T As String, Optional S As String = "No Data")
RunWhen = Now + TimeValue(T)
InfoBox.Caption = T
Application.OnTime RunWhen, "InfoHide", , True
InfoBox.Info.Caption = S
InfoBox.Show
End Sub

Willer
06-02-2012, 11:28 AM
Thx for Response..

Nope, Spotted the ' '

Application.OnTime RunWhen, "InfoHide", , True

Still Cant Get it to Work.. Have even tried..


Application.OnTime RunWhen, "Personal_XLS.ThisWorkbook.InfoHide", , True

This gives Different error .. Error 400 ..!

Grrr.. Simplest things give Biggest Headaches.. :think: