>I tried your example using your code and it worked fine. When I used the following code, it didn't work
>
>Dim oSC As ScriptControl
>Set oSC = New ScriptControl
>oSC.Language = "VBScript"
>
>Dim y As String
>y = "AutomationLetterWordDemo.txtCustomerName.Text"
>y = oSC.Eval(y)
>Debug.Print oSC.Eval(y)
>
>The string represented by y is a valid Form Text Control and contains a value of "Dan
>
>But when I execute "y = oSC.Eval(y)", the value of y is still "AutomationLetterWordDemo.txtCustomerName.Text"
>
>Tis a puzzle to me...
It has to be a valid VBScript expression. In your example the text should be enclosed within quotes for Eval to return the text box contents.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only