Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/06/2005, 09:51
e1_rg
 
Fecha de Ingreso: junio-2005
Mensajes: 7
Antigüedad: 19 años
Puntos: 0
ScritpControl tenga acceso a las declaraciones Public del resto del Programa

En un Modulo

Public Type LOCATIONS
RutaImgs As String
end type

Public LOC As LOCATIONS


En un Form o un Sub

Dim scrip
Dim StrCodigo As String
Dim Grupo As String
Dim sclave As String
Dim svalor As String

Grupo ="LOC"
sclave ="RutaImgs"
svalor = "C:\imgs\"

StrCodigo = Grupo & "." & sclave & "=" & Chr(34) & svalor & Chr(34)

Set scrip = CreateObject("ScriptControl")

With scrip
.Language = "VBScript"
.ExecuteStatement StrCodigo
End With
---------------------------------------------------------------------

Segun entiendo esto deberia dejar a LOC.RutaImgs con el valor de "C:\imgs\"
generandome un error en el ExecuteStatement donde no encuentra LOC ??????