Results 1 to 2 of 2

Macro for users to enter IP address

Threaded View

  1. #1
    Registered User
    Join Date
    04-03-2014
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    1

    Macro for users to enter IP address

    Hello. I'm newbie in excel VBA and macros bur with the help of this forum I create a little macro. I want to use it to get data from snmp and put it in excel cell. I managed to do this with this macro:
    Sub snmp()
    Set s = CreateObject("wscript.shell")
          Set s = s.exec("c:\snmpget -q -r:192.168.0.100 -t:10 -c:public -o:.1.3.6.1.4.1.32111.1.5.1.8.0")
          Range("B4").Select
          ActiveCell.Formula = s.stdout.readall
    End Sub
    Now I want to be able to change the IP address. For example in cell A4 to fill the IP. And the IP to change in the macro. So this macro to be use for different hosts.
    And one more little thing. I place a button for this macro and when I press it a cmd windows is popping for 1 second and hide. How can I make it not to show at all.
    Last edited by haunted; 04-07-2014 at 02:25 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Requesting help in Excel Macro Tutorial/Basic Steps in creating a Macro in Excel
    By rhaiyan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2013, 09:21 PM
  2. Replies: 2
    Last Post: 11-26-2012, 08:33 AM
  3. Excel Macro (excel for mac 2010) - update multiple excel books on criteria
    By genichigo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2012, 07:23 AM
  4. Excel 2003 Macro --> Excel 2000 Macro
    By Tejas.T in forum Excel General
    Replies: 2
    Last Post: 10-21-2012, 07:57 AM
  5. Optimizing Excel macro to find/replace with the list of data contained in the macro
    By Iceyburnz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-17-2008, 08:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1