Public VB Script Procedures

A

Andrew Chalk

I have a VB script Sub() that is used by several ASP pages. How do I make it
globally available rather than having to replicate the source code in each
ASP page that uses it?

Many thanks.
 
J

Jeff Cochran

I have a VB script Sub() that is used by several ASP pages. How do I make it
globally available rather than having to replicate the source code in each
ASP page that uses it?

You can't. Well, not as in an ASP.NET app anyway. If you make it an
include then you can simply include it in each file that uses it.

Jeff
 
A

Andrew Chalk

That was my approach Ray. However, when I move the Function from an ASP file
to a header and include it, I get an error:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CreateNENAFile'
/WebTelco2_Local/custquery.asp, line 168

The include line is

<!-- #include file =AddFile.inc -->

and the contents are just the script delimiters, <% and %>, and the
function, copied from the source file.

Do you, or anybody, have any idea why I get this behavior?

Many thanks.
 
A

Andrew Chalk

Scrap this -- problem solved.

Regards
Andrew Chalk said:
That was my approach Ray. However, when I move the Function from an ASP file
to a header and include it, I get an error:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CreateNENAFile'
/WebTelco2_Local/custquery.asp, line 168

The include line is

<!-- #include file =AddFile.inc -->

and the contents are just the script delimiters, <% and %>, and the
function, copied from the source file.

Do you, or anybody, have any idea why I get this behavior?

Many thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,220
Latest member
AugustinaJ

Latest Threads

Top