Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



if the excel sheet specified in script is not there,we get run time error how to handle the error ..

Answer / rayudu

Use on error resume next

Is This Answer Correct ?    3 Yes 1 No

if the excel sheet specified in script is not there,we get run time error how to handle the error ..

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

Post New Answer

More QTP Interview Questions

This is Karthic and my mail id is karthic.venkitapathi@gmail.com, please give me an idea to crack qtp 10

0 Answers  


what are the mandatory properties for a tex boxc (scenario?)

0 Answers  


how to create user defined functions in QTP? can any one expalin me with example.. Thanks in Advance for help

4 Answers  


Explain in brief about the QTP Automation Object Model.

1 Answers   Crea,


What is the use of Debug Viewer?

0 Answers  


How do u connect database through QTP tell me both Ms Access and SQL

2 Answers   Livetek,


Which Databases supports for QTP?

3 Answers   CTS,


1>How to get the browser name by writing the VBScript. 2>How did you used the GetROProperty and GetTOproperty .give real time scenario. 2>Give and real time ex for the bug having "High Severity and low priority"on banking doamin web based application.

2 Answers   Nous,


suppose take one row in a row 16 columns is there.in 16 columns 16 numbers is there.but i want to get each 3 column number.o/p :5 columns get in 16 columns means. so can anybody write this function? plz send if u know the answer.

2 Answers   Bosch,


What is action split and the purpose of using this in qtp?

0 Answers  


write vb script code to delete the duplicate values in an array.

4 Answers   ADP,


whenever U using QTP,Test Director, Why we using separate Bug tracking tool?

1 Answers  


Categories