Expand HostIP tool to also resolve for IPv6 addresses

I had this question after viewing IP Host Resolver - Make compatable with 64bit office.

I would like to expand this tool to also resolve for IPv6 addresses in the subsequent 3rd column if they exist.
160311-Host-IP.xlsm
Ted PennerSoftware Solutions ArchitectAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
It looks like you are using the code from this page: http://www.codeproject.com/Articles/712335/Followup-DNS-Lookup-and-Ping-in-Excel?ref=binfind.com/web  The comments show an IPv4 DNS lookup.  To get IPv6 info you will need an IPv6 connection with IPv6 DNS.
Ted PennerSoftware Solutions ArchitectAuthor Commented:
Are you saying that it's not possible to do this without writing proprietary information into the code?
Dave BaldwinFixer of ProblemsCommented:
The code that you are using has nothing in it to get IPv6 information.  Do you have an IPv6 connection to your machine?
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

Ted PennerSoftware Solutions ArchitectAuthor Commented:
If I do ipconfig, it does the trick and gives me the IPv6 address.  I want to have column three output that data.
Dave BaldwinFixer of ProblemsCommented:
Then you will have to add code that does the IPv6 lookup.  It's not there and I can't tell you what it is.  You can click on "Request Attention" above and get others to look at your question.  I did not see any similar code for IPv6 when I was searching.

Note: 'ipconfig' just asks your local machine what it's IPv6 address is.  It is not doing a DNS lookup like your code does for IPv4.
Professor JMicrosoft Excel ExpertCommented:
frugalmule

i am not sure if i understood your requirement, but can you give the attached a try and see how it works.
NSlookup-Resolve-HostName-or-IP.xlsm
Ted PennerSoftware Solutions ArchitectAuthor Commented:
I looked at this from work today and when I pulled it up in Excel 2010, I didn't even have to do anything for column b to change to #VALUE!.
Ted PennerSoftware Solutions ArchitectAuthor Commented:
I'm starting to really need this solution.  Please resolve if possible.
Professor JMicrosoft Excel ExpertCommented:
Can you please explain how did you get the error?
Did you open the attachment in my latest post?
Ted PennerSoftware Solutions ArchitectAuthor Commented:
I didn't do anything to get it to happen. I just opened it and watched the data change to #VALUE!
Professor JMicrosoft Excel ExpertCommented:
Did you open it with excel 32 or 64?
Ted PennerSoftware Solutions ArchitectAuthor Commented:
2010 32 bit
Ted PennerSoftware Solutions ArchitectAuthor Commented:
OK, I'm seeing good results but in column B, and prior to clicking on "Enable Content".  I still want to hang on to the IPv4 result but also include the IPv6 results, but only if it exists, in a third column.

I'm using Excel 2010 32 bit.  

What I am seeing is that column B returns the IPv6 values, but everything, including hostnames in column B is changed to #VALUE! when the usual "enable content" is pressed.
Professor JMicrosoft Excel ExpertCommented:
@frugalmule

please see attached. i have now put the old codes of Ip4 in column B and IPV6 if applicate in Column C.
160311-Host-IP.xlsm
Ted PennerSoftware Solutions ArchitectAuthor Commented:
Thank you sir.  However, when I put in my hostname or ip into 7a, it only produces the column B, but leaves column C empty.

Neither case produces an IPv6 address.
Professor JMicrosoft Excel ExpertCommented:
can you try with the attached?
160311-Host-IP.xlsm

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ted PennerSoftware Solutions ArchitectAuthor Commented:
Just tried the attached in post ID 41531555 for both IPv4 and Hostname and still nothing for column C.

I tried this on row 7.
Professor JMicrosoft Excel ExpertCommented:
but if you work with attachment uploaded in here  will it work for your Row7?
Ted PennerSoftware Solutions ArchitectAuthor Commented:
Huh?

That link points me back to this same thread.  What post ID should I try?
Professor JMicrosoft Excel ExpertCommented:
i mean this attachment
NSlookup-Resolve-HostName-or-IP.xlsm
Ted PennerSoftware Solutions ArchitectAuthor Commented:
The one in post ID 41513236 produces #VALUE! after accepting the two security prompts
Professor JMicrosoft Excel ExpertCommented:
perhaps you have some add-ins or some sort of duplicate sub routine or API declarations that is causing this. i cannot tell what is causing that. in my machine it works perfectly fine.
Ted PennerSoftware Solutions ArchitectAuthor Commented:
That attachment produces IPv6 for rows 1-4, but goes to #VALUE! after accepting the two security prompts.

The one in post ID 41513236 produces #VALUE! after accepting the two security prompts


The others you posted also produce IPv6 for your entries, but not for new entries on subsequent rows.
Ted PennerSoftware Solutions ArchitectAuthor Commented:
The one in post ID 41531555 produces IPv6 addresses that disappear after the second security message is accepted.
Professor JMicrosoft Excel ExpertCommented:
can you please post the screenshot of the security message?
Ted PennerSoftware Solutions ArchitectAuthor Commented:
Sure.  Attached is the error.Errors when opening macro enabled spreadsheets for the first time.
Ted PennerSoftware Solutions ArchitectAuthor Commented:
Works but buggy, still errors, reposting.


Here is the new question https://www.experts-exchange.com/questions/28937773/HostIP.html
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.