Pregunta: | 53918 - NO DISP. DE LICENCIA PARA UTILIZAR FUNCIÓN EN ENTORNO DISEÑO |
Autor: | Francesc Escamilla Arnau |
Hola a todos:
Tengo puesta esta función, que encontré en esta web, en una aplicación. Function SeleccionaAbreArchivo() Dim objDialog As Object Dim intResult As Integer Dim NombreArchivo As String Dim objShell As Object Dim EjecutaArchivo As Long Dim FSO As Object Set objDialog = CreateObject("UserAccounts.CommonDialog") objDialog.Filter = "Todos los archivos|*.*" 'objDialog.InitialDir = "" intResult = objDialog.ShowOpen If intResult = -1 Then NombreArchivo = objDialog.FileName Set objDialog = Nothing Set FSO = CreateObject("Scripting.FileSystemObject") NombreArchivo = FSO.GetFile(NombreArchivo).ShortPath Set FSO = Nothing Set objShell = CreateObject("Wscript.Shell") EjecutaArchivo = objShell.Run(NombreArchivo) Set objShell = Nothing End If End Function Mientras trabajo en windows XP no tengo problema pero cuando la aplicación "corre" en Windows 2000 me sale el siguiente error: "LA EXPRESION "AL HACER CLICK" QUE INTRODUJO COMO VALOR DE LA PROPIEDAD DE EVENTO PRODUJO UN ERROR: NO SE ENCONTRÓ LA INFORMACIÓN DE LICENCIA DE ESTE COMPONENTE. NO DISPONE DE UNA LICENCIA APROPIADA PARA UTILIZAR ESTA FUNCIÓN EN EL ENTORNO DE DISEÑO" Y en el depurador se detiene en: Set objDialog = CreateObject("UserAccounts.CommonDialog") Sabeis donde puede estar el error??. Saludos y gracias |
Respuesta: | Carlos Javier Mera Cevallos |
El error no esta en la linea de codigo sino el objeto que se esta creando, yo tambien tengo el mismo problema pero en Visual Basic y se debe a un error en la licencia. |