it has been a long long time since I used this, and it always USED to work without fail.
do any of you guys know why it no longer works, I suspect it is becasue www.whatsmyip.com
no longer has the same format as it used to. But I am not sure about how to put this right.
Private Sub Command1_Click()
Timer1.Enabled = False
Form1.Caption = "Countdown stopped!"
Private Sub Form_Load()
Dim IE, RET, POS1, POS2
Set IE = CreateObject("internetexpl
While IE.busy: DoEvents: Wend
RET = IE.document.Title
Set IE = Nothing
POS1 = InStr(1, RET, "is", vbTextCompare) + 3
POS2 = InStr(1, RET, "what", vbTextCompare)
Open "c:\ipoutputfile.txt" For Output As #1
Print #1, Mid(RET, POS1, POS2 = (POS1 + 1))
On Error Resume Next 'If error arises, goto next line
fil = "c:\ipoutputfile.txt" 'Select which file to look for
Open fil For Input As #1 'Try to open the file
If Err <> 0 Then 'If the file soesn't exist, error will ocurr
Open fil For Output As #1 'In case of error create the missing file
Command1.Caption = "Stop the timer"
Timer1.Tag = 5
Timer1.Interval = 1000
Timer1.Enabled = True 'If there's no error (meaning the file exists), start the timer
Private Sub Timer1_Timer()
Timer1.Tag = Val(Timer1.Tag) - 1
Form1.Caption = "The file exists! Exiting in " & Timer1.Tag & " ..."
If Timer1.Tag = "0" Then End
also should this not be = to not - Print #1, Mid(RET, POS1, POS2 - (POS1 + 1)) as debug keeps pulling this up.