Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: ^kazike^ en 31 Enero 2008, 11:08 am



Título: problema con inputbox
Publicado por: ^kazike^ en 31 Enero 2008, 11:08 am
Hola tengo el siguiente codigo en VB:
Código:
Public Function CreateScriptTemplate(TestKey As Long, _
        ByRef LocalPath As String) As Long
    ' Create a batch file to emulate a test script for

    ' this example

    Dim myf As String
   
    Dim path As String

    LocalPath = "c:\temp"

    myf = "C:\temp\batch.bat"
   
    'user must input the nunit path to can execute it
    path = InputBox("Enter the path where Nunit is intalled:", "Path needed")
    While (path = "")
     path = InputBox("Enter the path where Nunit is intalled:", "Path needed")
    Wend

    Open myf For Output As #1

    Print #1, "cd C:\Archivos de Programa\NUnit 2.4.5\bin" & vbCrLf & "nunit.exe" & vbCrLf & "pause"
   
    Close #1

    CreateScriptTemplate = 1

End Function

El tema es que se me cuelga, supongo que sea por el inputbox porque antes funcionaba bien.
¿Como podria hacerlo funcionar o que puede estar mal aqui? El proyecto es un exe activeX
Gracias y Saludos


Título: Re: problema con inputbox
Publicado por: Chefito en 31 Enero 2008, 17:04 pm
La verdad.....a mi me parece que el código esta bien, por supuesto te hablo si fuese una funcion para vb6 :). Dinos más datos. Investiga tu donde se te bloquea haciendo una depuración paso a paso por instrucciones.
Saludos.