that was embarrassing!
Now why doesnt this work?
VB Code:
Private Declare Function EbExecuteLine Lib "vba6.dll" (ByVal pStringToExec As Long, ByVal Foo1 As Long, ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long Function FExecuteCode(stCode As String, Optional fCheckOnly As Boolean) As Boolean FExecuteCode = EbExecuteLine(StrPtr(stCode), 0&, 0&, Abs(fCheckOnly)) = 0 End Function Private Sub Command1_Click() Dim a As String a = "hello" Dim TheString As String TheString = "a=text1.text" Debug.Print FExecuteCode(TheString, False) Debug.Print a End Sub




Reply With Quote