According to the PI ProcessBook Programmer Reference Guide (located in ProcessBook under help), Text.Contents takes a string value. So you need to do a type conversion to the variant type in order for it to be valid.
Try wrapping vVal on line 9 in a CStr type conversion so it looks like this:
Text1.Contents = CStr(vVal)
Here is my full code that I have tested to verify this works, if you are interested.
Sub button_click() Dim vrDate As Variant Dim vrVal As Variant Dim vrStatus As Variant 'Value1 is a value symbol displaying a SINUSOID tag's data vrVal = Value1.GetValue(vrDate, vrStatus) 'We need to type convert the variant vrVal using CStr() 'to properly store the value we received from Value1 Text1.Contents = CStr(vrVal) End Sub
Hope that helps,