09-05-2011, 07:52 PM
Hi Gump,
As per my understanding of the explantion u have given, i must say its better for you to compare the each cell value..
Ur code shld be something like this...
i hope this will work.
The problem with ur code is that it is not checking for a specific value, it is comparing two strings instead. So whatever the values are in the datatable, if the two rows values are equal, it will enter the userID always.
Do let me know if u need further informaton.
Regards,
Ankesh
As per my understanding of the explantion u have given, i must say its better for you to compare the each cell value..
Ur code shld be something like this...
Code:
a=datatable("A", dtGlobalSheet)
if a="ABC" Then
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "ABC"
Dialog("Login").WinButton("Cancel").Click
ElseIf a="DEF" Then
Dialog("Login").Activate
Dialog("Login").WinEdit("Password:").SetSecure "4e6224718ae0eaf92a4e26655f509650a67f9999"
Dialog("Login").WinButton("Cancel").Click
End If
i hope this will work.
The problem with ur code is that it is not checking for a specific value, it is comparing two strings instead. So whatever the values are in the datatable, if the two rows values are equal, it will enter the userID always.
Do let me know if u need further informaton.
Regards,
Ankesh