if the excel sheet specified in script is not there,we get
run time error how to handle the error ,please anybody
explain me in detail
Answers were Sorted based on User's Feedback
Answer / veeranki naveen
On error resume Next
err.clear
set Excl = createobject("excel.application")
set Workbook=Excl.Workbooks.open("C:\Folder\ExcelFile.xls")
if err.number <> 0 then
msgbox "Excel Sheet is not present at the specified path"
End If
OR
set fso = createobject ("scripting.filesystemobject")
bol = fso.fileexists ("C:\Folder\ExcelFile.xls")
if bol = false then
msgbox "Excel Sheet is not present at the specified path"
End If
msgbox
Is This Answer Correct ? | 1 Yes | 0 No |
how do you invoke the application through QTP?
In web page there is five OK buttons available, while recording i click on 3rd OK button, How QTP identify the 3rd OK button while running script? Is qtp identify 3rd ok button?
What is smart identification?
How we can call the scripit from another scripit in QTP?,Not a call Action
How to measure transaction time through VBScript without using start and end transaction points?
Which scripting language used by QTP?
what is On Error Resume Next ?
How can i count "spaces" in any sentence or a string if suppose " It is a Testing question" Here we have 4 gaps(spaces) Is there any function to find out spaces between words
How do u write a regular expression for date (dd/mm/yyyy) field ?
What is descriptive.create () in QTP?
Define QTP ?
Is it possible to call out to Java from QTP?