John,
thank you. I did as you suggested and it works fine. Below is my code for others as a starting point.
Kari
String ls_objects
String ls_objecttype
String ls_objectname
String ls_Band
Long p
Long TextX, TextWidth
Long MaxX = 0
ls_objects = dw_1.Object.DataWindow.Objects
messagebox("ls_objects", ls_objects)
p = 1
do while ls_objects <> '' AND p > 0
p = pos(ls_objects,'~t',1)
ls_objectname=left(ls_objects, p - 1)
ls_objecttype = dw_1.Describe(ls_objectname + ".Type")
ls_Band = dw_1.Describe(ls_objectname + ".Band")
IF Lower(ls_objecttype) = "text" AND Lower(ls_Band) = "header" THEN
TextX = Long(dw_1.Describe(ls_objectname + ".x"))
TextWidth = Long(dw_1.Describe(ls_objectname + ".width") )
IF TextX > MaxX THEN
MaxX = TextX
END IF
END IF
ls_objects=Mid(ls_objects, p +1)
loop
MessageBox("MaxX", MaxX)
MessageBox("TextWidth", TextWidth)
MessageBox("Total Width", MaxX + TextWidth)