Depende de cómo trates el tiempo. Una forma sería crear un Timer que aumente el valor de una variable cada un segundo, así podés guardar los datos como REG_DWORD.
Por ejemplo, cuando se inicia el programa lee la clave del registro para saber cuál fue el último valor del contador.
Function ReadUpTime() As Long
Dim r&, hKey&
Dim lLastTime&
r = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\MyApp", 0&, vbNullString, 0&, KEY_ALL_ACCESS, 0&, hKey, REG_OPENED_EXISTING_KEY)
If r = ERROR_SUCCESS Then
r = RegQueryValueExInt(hKey, "LastTime", 0&, REG_DWORD, lLastTime, 4)
ReadUpTime = lLastTime
r = RegCloseKey(hKey)
End If
End Function
Y para guardar el último valor del contador, sería casi lo mismo:
Function WriteUpTime(LastUptime As Long) As Boolean
Dim r&, hKey&
Dim lLastTime&
r = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\MyApp", 0&, vbNullString, 0&, KEY_ALL_ACCESS, 0&, hKey, REG_OPENED_EXISTING_KEY)
If r = ERROR_SUCCESS Then
r = RegSetValueExInt(hKey, "LastTime", 0&, REG_DWORD, LastUptime, 4)
WriteUpTime = (r = ERROR_SUCCESS)
r = RegCloseKey(hKey)
End If
End Function
Usá una variable global por ejemplo, y estableces el valor al inicio del formulario:
Private lUptime As Long
Private Sub Form_Load()
lUptime = ReadUpTime
End Sub
Y cuando se descarga el formulario guardas el valor actual
Private Sub Form_Unload(Cancel As Integer)
Call WriteUpTime(lUptime)
End Sub
Luego como te decía, el Timer aumentando el valor de la variable cada segundo:
Private Sub tmrUptime_Timer()
lUptime = lUptime + 1
lblUptime = "Tiempo desde el inicio de la aplicación: " & lUptime & " seg"
End Sub
Podrías usar las funciones de fecha y hora pero no podés saber si la fecha y hora del sistema están bien, de esta forma es relativo al programa.