View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_816_] joel[_816_] is offline
external usenet poster
 
Posts: 1
Default How to code macro to disconnect internet connection?


How are you making the internet connection? do yo mean to close a web
browser, shutdown a dialup connection, kill an ethernet connection. Yo
need to be a little bit more specific.

I program in C# and open and close connections all the time. I need to
know a little bit about the connection type to help with some code. I
think you want to close an Port to a particular IP address. Yo either
want to look at the ARP table or use the Loopback address 127.0.0.1 to
find all the active connections and then close the connection wiht a
particular IP address and Port Number.

This task may be easier if you download Visual studio 2008 which is
available from microsoft for free and use either VB Net, C++, or C#
which arethe 3 languages available in Studio. visual studio 2008 use
Net 3.4 library and there is plenty of documents in the microsoft
website under Net 3.5 showing examples of how to achieve this request.
I have code in C# which can be modified to to this. I got all my code
from searching the microsoft databases.

There isn't a lot of material on doing this from VBA although it can be
done. If yo have an excel application I recommend open the excel
application from Visual Studio. The C# tutorial in visual Studio had an
example of how to open a workbook which I did in about 15 minutes.


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

http://www.thecodecage.com/forumz/chat.php