Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Start VBscript code

Reply
 
Old 08-20-2009   #1 (permalink)
vqthomf


 
 

Start VBscript code

Hi I was wondering if a function or sub be run when the web page has been
selected.
Regards

My System SpecsSystem Spec
Old 08-20-2009   #2 (permalink)
3ng1n33r


 
 

RE: Start VBscript code

As far as I know, a function or sub, will only be run if the script calls for
it.

For example, having a function like at the end of the script, will only be
called when the script reaches the line that contains.

strPath = AddQuotes("C:\program files\symantec")

Function AddQuotes(strInput)
AddQuotes = Chr(34) & strInput & Chr(34)
End Function

Usually functions and subs are at the end of the script for that reason. If
your script doesn't call for the use of a function, that function won't be
parsed by the script.

At least that's how I understand they work, if I said anything wrong, please
correct me, gurus.

"vqthomf" wrote:
Quote:

> Hi I was wondering if a function or sub be run when the web page has been
> selected.
> Regards
My System SpecsSystem Spec
Old 08-20-2009   #3 (permalink)
arno


 
 

Re: Start VBscript code

Webpages generate events, to which subs (and functions) can respond.
For example: <BODY OnLoad="mySub()">

hth
arno

On Thu, 20 Aug 2009 02:21:13 -0700, vqthomf
<vqthomf@xxxxxx> wrote:
Quote:

>Hi I was wondering if a function or sub be run when the web page has been
>selected.
>Regards
My System SpecsSystem Spec
Old 08-20-2009   #4 (permalink)
vqthomf


 
 

Re: Start VBscript code

Thanks that did it I can see I have a lot to learn.

"arno" wrote:
Quote:

> Webpages generate events, to which subs (and functions) can respond.
> For example: <BODY OnLoad="mySub()">
>
> hth
> arno
>
> On Thu, 20 Aug 2009 02:21:13 -0700, vqthomf
> <vqthomf@xxxxxx> wrote:
>
Quote:

> >Hi I was wondering if a function or sub be run when the web page has been
> >selected.
> >Regards
>
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Convert Vb code to VBscript VB Script
Change a Javascript code to VBScript VB Script
RE: What to code in now that VS2008 has depreciated VBScript? VB Script
This device cannot start. (Code 10) Vista hardware & devices
Device Cannot Start (Code 10) Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46