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...

When and why do you use "OPTION EXPLICIT" in VB Script.
Is there any online help or something to learn the script
for Beginners?

Answer Posted / ritesh mahendrakar

You can declare variables with the Dim, Public or the
Private statement. Like this:

Dim myname
myname = "ritesh"

However, this method is not a good practice, because you
can misspell the variable name later in your script, and
that can cause strange results when your script is running.

If you misspell for example the "myname" variable
to "mynime", the script will automatically create a new
variable called "mynime". To prevent your script from doing
this, you can use the 'Option Explicit' statement. This
statement forces you to declare all your variables with the
dim, public or private statement.

Put the Option Explicit statement on the top of your
script. Like this:

Option Explicit
Dim myname
myname = "ritesh"

Is This Answer Correct ?    16 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi How to retrieve data from web element line by line?

2015


What are the different types of action?

958


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

1872


What is the expert view?

955


What are the recording modes in qtp?

994


terminal services client

2205


How to find operating system information using the qtp script?

1039


When you open QTP, how many sheets you can see?

1036


Can we write winrunner language i.e TSL in QTP tool?

1944


What is the differences between image check point and bit map check point?

1026


What is quicktest professional (qtp window?

989


Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris

2172


What is the use of sendkeys and what are send keys

2432


What is the architecture of your project? Can any one answer for this question plz........

1844


What are the ways you can synchronize?

1016