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
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?
How to analyzing the checpoint results?
How do you delete unwanted results in qtp?
What is test object model in quicktest professional (qtp)?
what are all the fileds present in object repository?
Why qtp the best testing tool?
How will you declare a variable in qtp?
Where to use function or action?
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
Explain the differences between table and db checkpoints?
What is the difference between rational rose and QTP?
What are the different kinds of test steps?
What is active screen?
what is supply chain management?