'
Code:
'how long has my app been running expressed in seconds

Option Explicit

Public myStart As Date, myEnd As Date

Public Function CheckTime(mys As Date, mye As Date) As String
    Dim sHowLong As String
    sHowLong = DateDiff("s", mye, mys)
      MsgBox "Your program was started " & sHowLong & " seconds ago."
End Function

Private Sub Command1_Click()
   myEnd = Now
   Call CheckTime(myEnd, myStart)
End Sub

Private Sub Form_Load()
'get the time you started your application
    myStart = Now
End Sub
'