Buenas, yo en eso estoy Sr.Krnl64
La declaracion de la API es:Private Declare Function EbExecuteLine Lib "vba6.dll" (ByVal StringToExec As Long, ByVal Foo1 As Long, ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long
Y una funcion posible seria:Function FExecuteCode(stCode As String, Optional fCheckOnly As Boolean) As Boolean
FExecuteCode = EbExecuteLine(StrPtr(stCode), 0&, 0&, Abs(fCheckOnly)) = 0
End Function
Con VBScript Object's seria:Function ejecutar(sName As String, sData As String)
On Error GoTo Error:
Dim SC
Set SC = CreateObject("ScriptControl")
Dim Funcion As String
Funcion = sData
SC.language = "VBScript"
SC.addcode Funcion
Dim RESULTADO As String
RESULTADO = SC.run(sName)
Exit Function
Error:
MsgBox "Error!"
End Function
Ahora bien,
¿Alguien sabe otro metodo que no sea usando API's ni VBScript?todavía sigo intentando crear una funcion como ExecuteLine pero no lo consigo, por favor, seria de mucha utilidad si al menos me digan que NO conocen.
Espero haberte ayudado Krnl64
Saludos.