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 object spy in quicktest professional?
what is the difference between rational rose and QTP? WHICH TOOL IS BETTER TO LEARN? PLEASE SEND ME AT sana_50218@yahoo.com sandeep@epuratech.com
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?
hai, i completed my b.tech in 2010 with 62.3%. i having knowledge on manual testing and Qtp. i want Relavent experience in testing.watever may be d salary i dont bother..I just want to gain knowledge. i dont have good communication skills.
What is the default object synchronization timeout in qtp?
What is the parameterization? Give one example?
If I change the property value at runtime is it effect is object repository?
how to create flat file datasubmission in qtp
How to explain a banking project in interview as a test engineer???
What are private functions in QTP? How they can be called from the function library?
what is run-time data?
What is the basic concept of quicktest professional (qtp)?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))
how will load the object during runtime?