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 |
what frame work you are following?
Differenece betwen Project and product ? when company need project or product?
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
Syntax for how to call one script from another and Syntax to call one "Action" in another?
What is exact difference between “while” and “do while” in QTP ?
How can i check items sorted or not in a weblist ? Give me the script for this...
what is the difference between function and subroutine ....here every one knows theoretically...here my QUESTION IS WHAT IS THE MEANING OF FUNCTION CAN RETURN A VALUE AND SUB CAN NOT RETURN A VALUE .....WHAT DOE'S IT MEAN FUNCTION CAN RETURN A VALUE HOW FUNCTION CAN AND SUB CAN'T ....GIVE A EXAMPLE FOR BOTH ....HOW IT CAN AND CAN NOT...HELP ANDY ONE....
Explain about the Test Fusion Report of QTP?
How will you test a stapler?
Analyzing the Checkpoint results ?
the question was on what techonlogy u been working on i said VB then he asked me the addin for VB in Qtp?
If there are 10 notepads opened on desktop. how can we close a particular 2nd notepad using script