Hi i wrote the following script in winrunner to check the boundary range:
1. VB Program contains (text box,Calculate and clear button)

Calculate button Coding:

Dim a As Integer
a = Val(Text1.Text)
If (a > 100) Then
 MsgBox ("value exceeds the maximum range")
ElseIf (a < 50) Then
 MsgBox ("value is less than the minimum range")
ElseIf (a >= 50 & a <= 100) Then
 MsgBox ("value is within the range")
End If

2.In winrunner Tools-> GUI Map Editor -> Learn -> I pointed it to the Boundary Range program and learnt all the GUI properties and saved in some abc.GUI file

3.Tools -> Data Table ->created a new table with the parameter "Numbers" and saved as "table.xls"

Winrunner Script:

path="C:\Program Files\Mercury Interactive\WinRunner\boundary\table.xls";

#Boundary Range
win_activate("Boundary Range");
  set_window("Boundary Range");
  edit_set("ThunderTextBox",ddt_val_by_row("C:\Program Files\Mercury Interactive\WinRunner\boundary\table.xls",i,"Numbers"));
    report_msg("val is less tan minimum range");
  else if (val>100)
    report_msg("val is greater than maximum range");
  else if(val>=50 && val <=100)
    report_msg("value is within the range");
  set_window("Boundary Range_0");
tl_step("boundary Testing ",pass,"Successfull")
#win_close("Boundary Range");

The script does not execute correctly, I mean it does not retrieve the values from the table.xls file and check it in the Boundary range program. But In the results page I get pass, successful message.