Language Table Keywords and VBA

Language Table Keywords and VBA

I have a static text element in a picture, and I need to set the text dynamically from the language table. Below is the VBA function I created to test this:
Public Sub testvba()
Dim zVariables As Variables
Dim ztest As variable
Dim ztest2 As variable
Dim tint As Integer
Dim tstr As String
Dim tvar As Variant

Dim zDownTimePicture As DynPicture
Dim zDownTimeText As Element

Set zDownTimePicture = thisProject.DynPictures.Item("3-ViewZone-1")
Set zDownTimeText = zDownTimePicture.Elements.Item("testvbatext")

Set zVariables = thisProject.Variables
Set ztest = zVariables.Item("testvba")
Set ztest2 = zVariables.Item("testvba2")

tint = CInt(ztest.Value)
tstr = "@alm" & tint
'MsgBox (tstr)
'MsgBox (zDownTimeText.DynProperties("Text"))
ztest2.Value = tstr

zDownTimeText.DynProperties("Text") = tstr
zDownTimeText.Update
End Sub

When I run the VBA macro, the static text element is not updated.
Is there a way to read keywords from the language table directly? Otherwise, how do I set the text in a static text element to a keyword from a language table with VBA?

This is a migrated post! Originally posted on 16.09.2008 by user jhines. Please be aware that information can be outdated.