Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/11/2010, 04:58
irenecoo
 
Fecha de Ingreso: noviembre-2010
Mensajes: 1
Antigüedad: 13 años, 5 meses
Puntos: 0
Error compilacion no se ha definido el tipo definido por el usuario

Tengo un pequeño problema, he realizado un programa y a la hora de realizar el .exe me sale un mensaje de error:ERROR COMPILACION NO SE HA DEFINIDO EL TIPO DEFINIDO POR EL USUARIO
Subraya la línea "Dim oShell As WshShell" dentro de la siguiente función:

Function ejecutar_Dos(Comando As String) As String
Dim oShell As WshShell
Dim oExec As WshExec
Dim ret As String

Set oShell = New WshShell
DoEvents

' ejecutar el comando
Set oExec = oShell.Exec("%comspec% /c " & Comando)
ret = oExec.StdOut.ReadAll()

' retornar la salida y devolverla a la función
ejecutar_Dos = ret ' Replace(ret, Chr(10), vbNewLine)

'DoEvents
'Me.SetFocus
End Function

Creo que es un problema de activar alguna referencia o algo por el estilo, pero no acierto a solucionarlo, si alguien me podría ayudar estaría muy agradecida.
Gracias anticipadas