VBA & Excel Internet Time
Legacy corporate environments often rely on Excel Macros (VBA). This script allows you to query the current internet time to timestamp reports or validate user actions, bypassing the local PC clock.
VB
Sub GetInternetTime()
Dim http As Object
Set http = CreateObject("MSXML2.XMLHTTP")
' Fetch Time for New York
http.Open "GET", "https://time.now/developer/api/timezone/America/New_York", False
http.Send
If http.Status = 200 Then
' Parse manually or display raw string
MsgBox "API Response: " & http.responseText
Else
MsgBox "Error fetching time"
End If
End Sub
Why use Time.Now for Productivity?
- Works in Excel, Access, Word
- No external plugins needed
- Standard Windows libraries