compare the string without using stringcomp function?

Answer Posted / cnu_thatavarthi

2. how to compare values without using String compare function?
Ans:
Option Explicit
Dim strValue

strValue = "Thatavarthi"

If strValue = "Thatavarthi" Then
MsgBox "Both strings are same"
Else
MsgBox "Both strings are not same"
End If

'Expected out Put
---------------------------

---------------------------
Both strings are same
---------------------------
OK
---------------------------

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what is variant in vbscript?

552


Is vbscript language a case-sensitive language and what does it mean?

544


What is the main difference between function and sub-procedure?

549


For a webbased application:- what should be code in expert veiw, for retrieving a single column name "username" from a server and checking whether exported "username" from datatable doesn't exist in server. suppose i have saved in excelsheet a username="gayatri" , which is exported, then checked for whether this username "gayatri" exist in server database or not ? if exist then allow to enter new username, which should be again checked for in loop , or else come out of loop and enter a distinct "username". plz let me have this answer in my id gayatrisahooin@hotmail.com

1749


Mention how to assign a date value to a variable?

585






if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.

1442


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

1614


How to capture a runtime error in vbscript?

628


In what way program "hello world" you can write in vbscript?

645


What are the 2 ways in which a variable can be declared in the vbscript language?

564


what is the differance between BYVAL,BYREF?

1766


What is vbscript language used for and which earlier language is it modeled upon?

529


Explain the filter expression?

627


How to add actions in driver script to run those actions in QTP?

1516


Explain the constants in vbscript?

560