Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I save my WAN IP to a text file.

Posted on 2004-03-21
3
Medium Priority
?
338 Views
Last Modified: 2008-03-06
Hi can some one help me with saving my WAN IP to a text file.
I am using a router so not even sure how VB is going to obtain the WAN IP.

Or even if your aware of the source code for this or some thing similar I would appreciate any help.
0
Comment
Question by:pnorris99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Expert Comment

by:___XXX_X_XXX___
ID: 10643561
Connect to some www address that returns to you your IP address in HTML format.
Possible address is http://checkip.dyndns.org/index.html
Look at:

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20925882.html
for more info
0
 
LVL 14

Accepted Solution

by:
aelatik earned 2000 total points
ID: 10643667
Private Sub Form_Load()
    Dim IE, RET, POS1, POS2
    Set IE = CreateObject("internetexplorer.application")
        IE.navigate "http://www.whatismyip.com"
        While IE.busy: DoEvents: Wend
        RET = IE.document.Title
        IE.Quit
    Set IE = Nothing
    POS1 = InStr(1, RET, "is", vbTextCompare) + 3
    POS2 = InStr(1, RET, "what", vbTextCompare)
    Open "c:\wanip.txt" For Output As #1
        Print #1, Mid(RET, POS1, POS2 - (POS1 + 1))
    Close #1
End Sub
0
 
LVL 1

Author Comment

by:pnorris99
ID: 10643892
Thanks for that, I have intergated it into some FTP source code I found, I dont have a static IP address so this will help me keep the links to my IIS webserver upto date.

Many Thankx
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question