10-15-2012, 02:45 PM
Hi Friends
I want to write a code which take all the values from the data table row by row as an argument of the function.
If I am using only one row data it is working fine :
BELOW IS THE CODE
But when same code is used under a for loop its not working, please anybody tell me whats the problem
Note: run one iteration is checked when loop is added
I want to write a code which take all the values from the data table row by row as an argument of the function.
If I am using only one row data it is working fine :
BELOW IS THE CODE
Code:
SelectSourceAttribute is a function
sSourcename= DataTable("SourceName", dtGlobalSheet)
sAttrbuteSearch= DataTable("AttributeName", dtGlobalSheet)
msgbox sSourcename
msgbox sAttrbuteSearch
SelectSourceAttribute sSourcename,sAttrbuteSearch
But when same code is used under a for loop its not working, please anybody tell me whats the problem
Code:
For i =1 to RowCount
sSourcename= DataTable("SourceName", dtGlobalSheet)
sAttrbuteSearch= DataTable("AttributeName", dtGlobalSheet)
msgbox sSourcename
msgbox sAttrbuteSearch
SelectSourceAttribute sSourcename,sAttrbuteSearch
Next
Note: run one iteration is checked when loop is added