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
Answer Posted / 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 |
Post New Answer View All Answers
what is the difference between the modular framework and datadriven frame work
If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?
Will down time for server and content maintenance/upgrades be allowed? how much?
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
Explain quicktest professional testing process?
How to get popup error message.
please post the interview questions for QA position in FACTSET
Please guide me release notes of Automation once scripts are completed
How to call a test from another test?
can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?
How to execute a winrunner script in quicktest professional?
Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)
There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?
what are the challenges you have faced while testing web based application using the automation tools ?
what is review