Dim whereSave As String Dim lastTime As Date Dim FSO As New filesystemobject Dim txtfile As TextStream whereSave = InputBox("What file do you want the log to be") Set txtfile = FSO.CreateTextFile(whereSave, True) txtfile.WriteLine Winsock1.LocalIP txtfile.Close Set txtfile = Nothing Do If DateDiff("h", lastTime, Now) >= 1 Then Set txtfile = FSO.OpenTextFile(whereSave, ForAppending) txtfile.WriteLine Winsock1.LocalIP txtfile.Close lastTime = Now End If DoEvents Loop