Hi all,
I have 2 .vbs files (a.vbs and b.vbs).
-------------------------------------------------------
Content of a.vbs file:
Option Explicit
Public Sub A()
End Sub
--------------------------------------------------------
I want to call Sub A() of a.vbs in b.vbs (include a.vbs in b.vbs)
How to achieve this?
Thanks so much!
4 2816
If you’re trying to include a file in an ASP file the syntax is:
<!--#include file="FilePathAndName"-->
Or
<!--#include virtual=" FilePathAndName "-->
The differentness between the two keywords is when using the virtual keyword you indicate a path beginning with a virtual directory but, when using the file keyword you indicate the relative path from the calling file.
You can add as many includes as you need. Now for the fun part, if you want one function to be called from another include then make sure that include file is listed first.
Example page that is called FileC.asp:
<!--#include file="FileA.asp"-->
<!--#include file="FileB.asp"-->
There is a Function that is located in FileA.asp that needs to be called from a Function in FileB.asp that was originally triggered by a Sub in FileC.asp
I told you that was the fun part..
I hope that I explained it clearly for an ASP include~
Are you actually using VB6, not ASP? If so you've posted in the wrong forum, we can't help you out there. Let me know and I will move this thread to the Visual Basic forum.
Sincerely,
Mark
If you’re trying to include a file in an ASP file the syntax is:
<!--#include file="FilePathAndName"-->
Or
<!--#include virtual=" FilePathAndName "-->
The differentness between the two keywords is when using the virtual keyword you indicate a path beginning with a virtual directory but, when using the file keyword you indicate the relative path from the calling file.
You can add as many includes as you need. Now for the fun part, if you want one function to be called from another include then make sure that include file is listed first.
Example page that is called FileC.asp:
<!--#include file="FileA.asp"-->
<!--#include file="FileB.asp"-->
There is a Function that is located in FileA.asp that needs to be called from a Function in FileB.asp that was originally triggered by a Sub in FileC.asp
I told you that was the fun part..
I hope that I explained it clearly for an ASP include~
trongnguyen was asking not me </grin>. But I do think he was asking a VB6 question and I turned it into an ASP one.
Sorry~
No need to apologize :) Just want to get the post to the right area.
Sincerely,
Mark
trongnguyen was asking not me </grin>. But I do think he was asking a VB6 question and I turned it into an ASP one.
Sorry~
Sign in to post your reply or Sign up for a free account.
Similar topics
by: atv |
last post by:
Alright, i have some questions concerning include files en global
variables.I hope someone is willing to answer these.
1).Why is it that if i define a global variable in a file, say main.c,
and...
|
by: Derrick Coetzee |
last post by:
It seems like, in every C source file I've ever seen, there has been a
very definite include order, as follows:
- include system headers
- include application headers
- include the header...
|
by: David Mathog |
last post by:
One thing that can make porting C code from one
platform to another miserable is #include. In particular,
the need to either place the path to an included file within
the #include statement or to...
|
by: Jon Rea |
last post by:
I am currently cleaning up an application which was origainlly hashed
together with speed of coding in mind and therefore contains quite a few
"hacky" shortcuts.
As part of this "revamping"...
|
by: Nate |
last post by:
Hello,
I am looking for a method to automatically declare variables in C.
I'm not sure if there is a good way to do this, but I had something
like this in mind...
int i;
for(i = 1; i < 4;...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |