ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¨D¨Ï¥Îvba ping

¨D¨Ï¥Îvba ping

Dears
·Q½Ð°Ý§Ú¤@¦¸¦³¦hµ§¸ê®Æ»Ý­nping®æ¦¡¦p¤U¡G
¥x¥_        10.1.1.1                10.1.1.2                10.1.1.3       
¥x¤¤        10.2.1.1                10.2.1.2                10.2.1.3
¨Ã»Ý­n¦b¦U­ÓIP¹j¤@Äæ¥h¦^ÂÐping¬O§_¥¿½T¡A½Ð°Ý¸Ó«ç»ò ¥h¼g?!

·PÁ¤j®aªº¦^ÂлPÀ°¦£!!

TOP

¦^´_ 13# GBKEE
ÁÂÁ±z¡I
  1. .Open ActiveWorkbook.Path & "\¾÷²¼°O¿ý©ú²Óªí.mdb"
½Æ»s¥N½X
¨Æ¹ê¤W§Ú¨Ã¤£¬O­n¶}±Ò "¾÷²¼°O¿ý©ú²Óªí.mdb"¡A¦Ó¬O­n«ü¦V¤w¶}±Òªº Excel ¥»¨­¡A
¦]¬°±µ¤U¨Ó­n¬d¸ß¡B§R°£¡B·s¼W¡B©Î§ó·sªº¼Ðªº§¡¬°  Excel ¥»¨­«ü©wªº¤u§@ªí³æ
¸ê®Æ¿ý¦Ó«D Access ¸ê®Æ®wªº¸ê®Æ¿ý¡C
ÁÂÁ±z¡I

TOP

¦^´_ 12# c_c_lai
http://neural.cs.nthu.edu.tw/jan ... asp?SessionCount=11
http://support.microsoft.com/kb/257819/zh-tw#RetrieveMetadata
http://www.blueshop.com.tw/board ... 10110153028R5I.html
  1. Sub Test()
  2.     Dim cnn As Object       '  New ADODB.Connection
  3.     Dim cmd As Object       '  New ADODB.Command
  4.     Dim rs As Object        '  New ADODB.Recordset

  5.     Set cnn = CreateObject("ADODB.Connection")
  6.     Set rs = CreateObject("ADODB.Recordset")
  7.     Set cmd = CreateObject("ADODB.Command")

  8.     With cnn
  9.         If .State = 1 Then .Close    '  adStateOpen
  10.         .Provider = "Microsoft.Jet.OLEDB.4.0"
  11.        ' .ConnectionString = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" & _
  12.                             ActiveWorkbook.Path & Application.PathSeparator & ActiveWorkbook.Name
  13.         .Open ActiveWorkbook.Path & "\¾÷²¼°O¿ý©ú²Óªí.mdb"
  14.     End With
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 11# GBKEE
¶¶±a½Ð±Ð±z¡G
¥H¤U´ú¸Õ©ó2003 Excel¤¤¡A ©ó Set cnn «áµo²{ cnn ­È¬° ""¡A
©Ò¥H¦b .Open ®É«K¥X¿ù¤F¡C¦b¤u¨ã->³]©w¤Þ¥Î¶µ¥Ø¤¤­nª`·N¨º¨Ç¶µ¦¸¡H
¦ý¬O¦¹»yªk¦b 2010 Àô¹Ò¤U°õ¦æ³£ OK¡A¥¿½TÀ³¦p¦ó³B¸Ì¡H
P.S. ³o¬O§Ú¦b Excel¤u§@ªí³æ»PAccess¸ê®Æ®wªºVBA¤¬°Ê°ÝÃD ¤¤ªº´£°Ý¡A
     ¦¹³¡¤À¬O¬°¤F­n¦P®É¥H ADODB »yªk¨Ó³B²z¤u§@ªí³æ¤º¤§¸ê®Æ¿ý¦Ó³]©wªº¡C
  1. Sub Test()
  2.     Dim cnn As Object       '  New ADODB.Connection
  3.     Dim cmd As Object       '  New ADODB.Command
  4.     Dim rs As Object        '  New ADODB.Recordset

  5.     Set cnn = CreateObject("ADODB.Connection")
  6.     Set rs = CreateObject("ADODB.Recordset")
  7.     Set cmd = CreateObject("ADODB.Command")

  8.     With cnn
  9.         If .State = 1 Then .Close    '  adStateOpen
  10.         
  11.         .ConnectionString = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" & _
  12.                             ActiveWorkbook.Path & Application.PathSeparator & ActiveWorkbook.Name
  13.         .Open     
  14.     End With
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_ 10# c_c_lai
9#µ{¦¡ªº«e´£¬O¤w°õ¦æ8#ªþÀɪº ipchange()
¦p·|·¸¦ìÀ³¸ê®Æ¶q¤j®É¬O  C As Integer
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 9# GBKEE
  1. Set Rng = .Range("C2", .Range("C2").End(xlDown)).Resize(, .Range("C1").End(xlToRight).Column - 2)
½Æ»s¥N½X
»Ý§ï¦¨¡G
  1. Set Rng = .Range("C2", .Range("C65535").End(xlUp)).Resize(, .Range("C1").End(xlToRight).Column - 2)
½Æ»s¥N½X
§_«h·|µo¥Í·¸¦ì¡C

TOP

¦^´_ 8# loveinput
¦P®É¶]¨â­Óµ{¦¡! (µ{¦¡°õ¦æ®É,²¾°Ê·Æ¹«,Áä½L,©ö¥X¿ù)
  1. Option Explicit
  2. Sub Ex_Ping()
  3.     Dim AR(), Rng As Range, R As Integer, C As Integer, termPing As Object, termStatus As Variant
  4.     With Worksheets("Sheet1")
  5.         Set Rng = .Range("C2", .Range("C2").End(xlDown)).Resize(, .Range("C1").End(xlToRight).Column - 2)
  6.         AR = Rng                                'Âà¤J°}¦C
  7.     End With
  8.     For R = 1 To UBound(AR)                     '°}¦C:²Ä¤@ºû(¦C)
  9.         For C = 1 To UBound(AR, 2) Step 2       '°}¦C:²Ä¤Gºû(Äæ)  Step 2 ¶¡¹j 2Äæ
  10.             Application.StatusBar = AR(R, C)
  11.             Set termPing = GetObject("winmgmts:").ExecQuery _
  12.                     ("Select * from Win32_PingStatus where Address = '" & AR(R, C) & "'")
  13.             For Each termStatus In termPing
  14.                 With termStatus
  15.                     If IsNull(.StatusCode) Or .StatusCode <> 0 Then ' Terminal¥¢±Ñ
  16.                         AR(R, C + 1) = "Termin 3G¤£³q" '                termresResult = "Time Out"
  17.                     Else ' ¦¨¥\
  18.                         AR(R, C + 1) = "Termin 3G³q" '                termresResult = .ResponseTime & "ms"   '¨ú±oATUR¦^À³®É¶¡
  19.                     End If
  20.                 End With
  21.             Next
  22.         Next
  23.     Next
  24.     Rng = AR                        '¾É¥X°}¦C
  25.     Application.StatusBar = "OK"
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

upping.zip (83.88 KB)
ªG¯u¬O°ø½Íªü!!ÁÙ±æ«ü¾É¡A§ó·s¦pªþ¥ó

TOP

¦^´_ 6# loveinput
Sub ipchange() ¤£¯à¥¿±`°õ¦æ, °ø½Í§Ú¥D­n¬O°õ¦æping1~ping7ªº°Ê§@¡A§Æ±æ¯à¦P®É°õ¦æ!!
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD