pcs at azizaz.com
pcs at azizaz.com
Thu Jan 24 23:27:33 CST 2008
This one is for Mr Colby:
Hi John,
Had a look at C2DbWakeupCall.mdb
Whereas I can get notepad to kick in (Yes!) I have problems
getting a public sub or function in the mdb to do the
same....
Your function that makes the process kick in looks like
this:
Function Run(lstrProcessName) As Boolean
Dim lngProc As Long
'Hasn't run today so check if the time is > mdetTimeToRun
If Time() > mdteTimeToRun Then
If Date > mdteLastRan Then
'Mark mdteLastRun = Now()
mdteLastRan = Date
'
If mblnRunCommand Then
lngProc = WinExec(mstrProcessName, 1)
End If
'and return true
lstrProcessName = mstrProcessName
Run = True
End If
End If
End Function
I changed the follwing section to:
If mblnRunCommand Then
lngProc = WinExec(mstrProcessName, 1)
'added
Else
Eval (mstrProcessName & "()")
'end added
End If
thinking that if the tickbox on the form (mblnRunCommand)
has not been ticked, and in the text control on the form I
add the name of a public sub or function, that procedure
should start running.... but it don't!!
mstrProcessName is "bshTest" which is
Public Sub bshTest()
MsgBox "Hello Universe?", vbQuestion + vbOKCancel
End Sub
The error is 2425 : The expression you entered has a
function name that Microsoft Office can't find.
What am I missing?
Regards
borge