Hi ,
I have tried the same and is working fine
Code:
GroupName = DataTable.GetSheet("Action1").GetParameter("GroupName").ValueByRow(1)
'GroupName="CLIENT DOCUMENTS - WBS"
If not strcomp(GroupName,"CLIENT DOCUMENTS - WBS",1)=0 or strcomp(GroupName, "COMMISSION REPORTS BY SUB / BRANCH / REP",1)=0 or strcomp(GroupName,"BRANCH REPORT SEARCHES",1)=0 or strcomp(GroupName, "SUB-FIRM REPORT SEARCHES",1)=0 or strcomp(GroupName, "FIRM REPORT SEARCHES",1)=0 then
msgbox "no match"
else
msgbox "match"
end if
Alternatively like anemuday said ,try the below code....
The mistake in your code is string declaration
str=str="CLIENT DOCUMENTS - WBS" or "COMMISSION REPORTS BY SUB / BRANCH / REP" or "BRANCH REPORT SEARCHES" or "SUB-FIRM REPORT SEARCHES" or "FIRM REPORT SEARCHES"
and the correction is
str="CLIENT DOCUMENTS - WBS,COMMISSION REPORTS BY SUB / BRANCH / REP,BRANCH REPORT SEARCHES,SUB-FIRM REPORT SEARCHES,FIRM REPORT SEARCHES"
copy & paste the below code and run its working fine.
Code:
str="CLIENT DOCUMENTS - WBS,COMMISSION REPORTS BY SUB / BRANCH / REP,BRANCH REPORT SEARCHES,SUB-FIRM REPORT SEARCHES,FIRM REPORT SEARCHES"
GroupName="CLIENT DOCUMENTS"
if instr(1,str,GroupName) > 0 then
msgbox "String exists"
else
msgbox "String does not exist"
end if
If you still have issues with the code. Please post the error message
Regards,
Ravi