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

write any ttest cases using check points and parameterization

1823


when we use filter funtiom invb script(QTP)

2304


How to delete a cookie using vbscript?

555


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

12901


What is the use of the formatdatetime function in the vbscript language?

556






How will you convert a given number to long in vbscript?

494


Why is the use of exit do or exit for statements within loops discouraged?

569


please can you help me to get a code of flames using a visual basic 6

1230


what is the use of QCUtil? explain with one example?

6326


How to Enter Values on the Command promt using VB script

1534


What is the difference between a dictionary and an array?

583


What is purpose of scripting.filesystemobject class in vbscript?

629


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2905


What is dictionary object in vbscript? Explain?

628


Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it

2243