LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default IP address to Hostname in Excel


You can get the PC Name by usding the environmental variable
COMPUTERNAME


computerName = environ("COMPUTERNAME")


You can get the IP address from the computername by doing a ipconfig
command to the host name. From a sheel prompt

1) Start - run - c:\windos\system32\cmd.exe
2) ipconfig


You can run these commands from a sheel command like this

ComputerName = Environ("ComputerName")

Shell "cmd /c C:\windows\system32\ipconfig c:\temp\ipconfig.txt", 0


You can then open the text file to get the results.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194661

http://www.thecodecage.com/forumz

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hostname from IP address NickT Excel Worksheet Functions 1 April 9th 10 02:31 PM
How do I avoid excel change absolute address to relative address Miguel Excel Discussion (Misc queries) 3 May 10th 07 11:18 PM
Converting list of IP Addresses to list of Hostname M. Eteum Excel Worksheet Functions 0 March 23rd 06 06:16 PM
Get IP address for a remote computer based on its hostname stabilo Excel Programming 1 February 14th 06 07:08 PM
LINKING Address cells from an EXCEL spreadsheet to fill MapQuest Address Info Duane S. Meyer Excel Programming 0 August 30th 03 12:16 AM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"