Adding external modules to a project...need help calling them 
Author Message
 Adding external modules to a project...need help calling them

OK...here we go...

I need to add 3 external modules (.bas) to my standard .exe.  I have one
command button and 3 option radio buttons on the form.  When the command
button is "clicked" I need the code from the appropriate external module to
be executed depending on which option radio button is selected.  How do I
"call" the external module to run the code?
--
James McGril
New VB Programmer



Fri, 19 Mar 2004 22:36:57 GMT  
 Adding external modules to a project...need help calling them
You will need to add the module to your project when you compile it.  Then
all of the code will be withing that one standard EXE.  Alternatively you
could create an ActiveX DLL or ActiveX EXE and call the objects that way,
but you would have to change everything from being in a module to being in
a class.

Kevin Williamson - Microsoft Visual Basic Support
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.

--------------------

| Subject: Adding external modules to a project...need help calling them
| Date: Mon, 1 Oct 2001 09:36:57 -0500
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| Newsgroups: microsoft.public.vb.com
| NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com 47.184.112.20
| Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04
| Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:19996
| X-Tomcat-NG: microsoft.public.vb.com
|
| OK...here we go...
|
| I need to add 3 external modules (.bas) to my standard .exe.  I have one
| command button and 3 option radio buttons on the form.  When the command
| button is "clicked" I need the code from the appropriate external module
to
| be executed depending on which option radio button is selected.  How do I
| "call" the external module to run the code?
| --
| James McGril
| New VB Programmer

|
|
|



Sat, 20 Mar 2004 00:54:49 GMT  
 Adding external modules to a project...need help calling them
Whoa!  Over my head...I think...Lets see if I can understand this one.

So now I have an ActiveX exe.  I have added the 3 modules and on the main
form I have declared all of my public variables so they should be available
everywhere.  I have a command button and when it is clicked I want it to
"call" the code in the external module (.bas) depending on the option button
selected.  Is it possible that way?...Or do I have to create and ActiveX
dll.  If so, do I simply add the .dll to the project and just "call" it".
What would the syntax look like?

Desperately need help!  :)

--
James McGril
New VB6 Programmer


Quote:
> You will need to add the module to your project when you compile it.  Then
> all of the code will be withing that one standard EXE.  Alternatively you
> could create an ActiveX DLL or ActiveX EXE and call the objects that way,
> but you would have to change everything from being in a module to being in
> a class.

> Kevin Williamson - Microsoft Visual Basic Support
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
> reserved.

> --------------------

> | Subject: Adding external modules to a project...need help calling them
> | Date: Mon, 1 Oct 2001 09:36:57 -0500
> | Lines: 13
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
> | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

> | Newsgroups: microsoft.public.vb.com
> | NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com 47.184.112.20
> | Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04
> | Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:19996
> | X-Tomcat-NG: microsoft.public.vb.com
> |
> | OK...here we go...
> |
> | I need to add 3 external modules (.bas) to my standard .exe.  I have one
> | command button and 3 option radio buttons on the form.  When the command
> | button is "clicked" I need the code from the appropriate external module
> to
> | be executed depending on which option radio button is selected.  How do
I
> | "call" the external module to run the code?
> | --
> | James McGril
> | New VB Programmer

> |
> |
> |



Sat, 20 Mar 2004 03:09:33 GMT  
 Adding external modules to a project...need help calling them
James,

You definitely don't want an ActiveX EXE.  Just create a Standard EXE.  
Then add your main form.  Then add the 3 modules.  You can do all of this
through Project->Add xxxx.  You will have to put all of your public
variables in one of the modules in order for them to be global, otherwise
they will be part of an instance of a form.  Then from your form all you
have to do is type the function name.

Kevin Williamson - Microsoft Visual Basic Support
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.

--------------------



| Subject: Re: Adding external modules to a project...need help calling them
| Date: Mon, 1 Oct 2001 14:09:33 -0500
| Lines: 65
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| Newsgroups: microsoft.public.vb.com
| NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com 47.184.112.20
| Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp05
| Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:20019
| X-Tomcat-NG: microsoft.public.vb.com
|
| Whoa!  Over my head...I think...Lets see if I can understand this one.
|
| So now I have an ActiveX exe.  I have added the 3 modules and on the main
| form I have declared all of my public variables so they should be
available
| everywhere.  I have a command button and when it is clicked I want it to
| "call" the code in the external module (.bas) depending on the option
button
| selected.  Is it possible that way?...Or do I have to create and ActiveX
| dll.  If so, do I simply add the .dll to the project and just "call" it".
| What would the syntax look like?
|
| Desperately need help!  :)
|
| --
| James McGril
| New VB6 Programmer



| > You will need to add the module to your project when you compile it.  
Then
| > all of the code will be withing that one standard EXE.  Alternatively
you
| > could create an ActiveX DLL or ActiveX EXE and call the objects that
way,
| > but you would have to change everything from being in a module to being
in
| > a class.
| >
| > Kevin Williamson - Microsoft Visual Basic Support
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > You assume all risk for your use. ? 2001 Microsoft Corporation. All
rights
| > reserved.
| >
| > --------------------

| > | Subject: Adding external modules to a project...need help calling them
| > | Date: Mon, 1 Oct 2001 09:36:57 -0500
| > | Lines: 13
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| > | Newsgroups: microsoft.public.vb.com
| > | NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com
47.184.112.20
| > | Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04
| > | Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:19996
| > | X-Tomcat-NG: microsoft.public.vb.com
| > |
| > | OK...here we go...
| > |
| > | I need to add 3 external modules (.bas) to my standard .exe.  I have
one
| > | command button and 3 option radio buttons on the form.  When the
command
| > | button is "clicked" I need the code from the appropriate external
module
| > to
| > | be executed depending on which option radio button is selected.  How
do
| I
| > | "call" the external module to run the code?
| > | --
| > | James McGril
| > | New VB Programmer

| > |
| > |
| > |
| >
|
|
|



Sat, 20 Mar 2004 04:11:49 GMT  
 Adding external modules to a project...need help calling them
The global variables part is working, however, there is another problem now.
I have some text boxes on my main form (e.g. txtDns1).  When I try to run
the program, I get a "Compile error:  Variable not defined" and is
referencing txtDns1.  The information that is in the text box (on the main
form) needs to be able to be accessed by the newly added module.  How can I
make all of the information that is inputted into my text boxes (on the main
form) available to the code that needs to be executed by the external
module?
--
James McGril
New VB6 Programmer


Quote:
> James,

> You definitely don't want an ActiveX EXE.  Just create a Standard EXE.
> Then add your main form.  Then add the 3 modules.  You can do all of this
> through Project->Add xxxx.  You will have to put all of your public
> variables in one of the modules in order for them to be global, otherwise
> they will be part of an instance of a form.  Then from your form all you
> have to do is type the function name.

> Kevin Williamson - Microsoft Visual Basic Support
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
> reserved.

> --------------------



> | Subject: Re: Adding external modules to a project...need help calling
them
> | Date: Mon, 1 Oct 2001 14:09:33 -0500
> | Lines: 65
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
> | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

> | Newsgroups: microsoft.public.vb.com
> | NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com 47.184.112.20
> | Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp05
> | Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:20019
> | X-Tomcat-NG: microsoft.public.vb.com
> |
> | Whoa!  Over my head...I think...Lets see if I can understand this one.
> |
> | So now I have an ActiveX exe.  I have added the 3 modules and on the
main
> | form I have declared all of my public variables so they should be
> available
> | everywhere.  I have a command button and when it is clicked I want it to
> | "call" the code in the external module (.bas) depending on the option
> button
> | selected.  Is it possible that way?...Or do I have to create and ActiveX
> | dll.  If so, do I simply add the .dll to the project and just "call"
it".
> | What would the syntax look like?
> |
> | Desperately need help!  :)
> |
> | --
> | James McGril
> | New VB6 Programmer



> | > You will need to add the module to your project when you compile it.
> Then
> | > all of the code will be withing that one standard EXE.  Alternatively
> you
> | > could create an ActiveX DLL or ActiveX EXE and call the objects that
> way,
> | > but you would have to change everything from being in a module to
being
> in
> | > a class.
> | >
> | > Kevin Williamson - Microsoft Visual Basic Support
> | > This posting is provided "AS IS" with no warranties, and confers no
> | rights.
> | > You assume all risk for your use. ? 2001 Microsoft Corporation. All
> rights
> | > reserved.
> | >
> | > --------------------

> | > | Subject: Adding external modules to a project...need help calling
them
> | > | Date: Mon, 1 Oct 2001 09:36:57 -0500
> | > | Lines: 13
> | > | X-Priority: 3
> | > | X-MSMail-Priority: Normal
> | > | X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
> | > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

> | > | Newsgroups: microsoft.public.vb.com
> | > | NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com
> 47.184.112.20
> | > | Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04
> | > | Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:19996
> | > | X-Tomcat-NG: microsoft.public.vb.com
> | > |
> | > | OK...here we go...
> | > |
> | > | I need to add 3 external modules (.bas) to my standard .exe.  I have
> one
> | > | command button and 3 option radio buttons on the form.  When the
> command
> | > | button is "clicked" I need the code from the appropriate external
> module
> | > to
> | > | be executed depending on which option radio button is selected.  How
> do
> | I
> | > | "call" the external module to run the code?
> | > | --
> | > | James McGril
> | > | New VB Programmer

> | > |
> | > |
> | > |
> | >
> |
> |
> |



Sat, 20 Mar 2004 05:06:49 GMT  
 Adding external modules to a project...need help calling them
In your module (and if they are part of your project now, they are not
external modules anymore) you will have to also reference the form that the
textbox is on.  So, if your txtDns1 is on Form1, then in your Module you
would do:
    value = Form1.txtDns1.Text

Kevin Williamson - Microsoft Visual Basic Support
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.

--------------------



| Subject: Re: Adding external modules to a project...need help calling them
| Date: Mon, 1 Oct 2001 16:06:49 -0500
| Lines: 133
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| Newsgroups: microsoft.public.vb.com
| NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com 47.184.112.20
| Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04
| Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:20023
| X-Tomcat-NG: microsoft.public.vb.com
|
| The global variables part is working, however, there is another problem
now.
| I have some text boxes on my main form (e.g. txtDns1).  When I try to run
| the program, I get a "Compile error:  Variable not defined" and is
| referencing txtDns1.  The information that is in the text box (on the main
| form) needs to be able to be accessed by the newly added module.  How can
I
| make all of the information that is inputted into my text boxes (on the
main
| form) available to the code that needs to be executed by the external
| module?
| --
| James McGril
| New VB6 Programmer



| > James,
| >
| > You definitely don't want an ActiveX EXE.  Just create a Standard EXE.
| > Then add your main form.  Then add the 3 modules.  You can do all of
this
| > through Project->Add xxxx.  You will have to put all of your public
| > variables in one of the modules in order for them to be global,
otherwise
| > they will be part of an instance of a form.  Then from your form all you
| > have to do is type the function name.
| >
| > Kevin Williamson - Microsoft Visual Basic Support
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > You assume all risk for your use. ? 2001 Microsoft Corporation. All
rights
| > reserved.
| >
| > --------------------



| > | Subject: Re: Adding external modules to a project...need help calling
| them
| > | Date: Mon, 1 Oct 2001 14:09:33 -0500
| > | Lines: 65
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| > | Newsgroups: microsoft.public.vb.com
| > | NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com
47.184.112.20
| > | Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp05
| > | Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:20019
| > | X-Tomcat-NG: microsoft.public.vb.com
| > |
| > | Whoa!  Over my head...I think...Lets see if I can understand this one.
| > |
| > | So now I have an ActiveX exe.  I have added the 3 modules and on the
| main
| > | form I have declared all of my public variables so they should be
| > available
| > | everywhere.  I have a command button and when it is clicked I want it
to
| > | "call" the code in the external module (.bas) depending on the option
| > button
| > | selected.  Is it possible that way?...Or do I have to create and
ActiveX
| > | dll.  If so, do I simply add the .dll to the project and just "call"
| it".
| > | What would the syntax look like?
| > |
| > | Desperately need help!  :)
| > |
| > | --
| > | James McGril
| > | New VB6 Programmer



| > | > You will need to add the module to your project when you compile it.
| > Then
| > | > all of the code will be withing that one standard EXE.  
Alternatively
| > you
| > | > could create an ActiveX DLL or ActiveX EXE and call the objects that
| > way,
| > | > but you would have to change everything from being in a module to
| being
| > in
| > | > a class.
| > | >
| > | > Kevin Williamson - Microsoft Visual Basic Support
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | > You assume all risk for your use. ? 2001 Microsoft Corporation. All
| > rights
| > | > reserved.
| > | >
| > | > --------------------

| > | > | Subject: Adding external modules to a project...need help calling
| them
| > | > | Date: Mon, 1 Oct 2001 09:36:57 -0500
| > | > | Lines: 13
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| > | > | Newsgroups: microsoft.public.vb.com
| > | > | NNTP-Posting-Host: h20s112a184n47.user.nortelnetworks.com
| > 47.184.112.20
| > | > | Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04
| > | > | Xref: cppssbbsa01.microsoft.com microsoft.public.vb.com:19996
| > | > | X-Tomcat-NG: microsoft.public.vb.com
| > | > |
| > | > | OK...here we go...
| > | > |
| > | > | I need to add 3 external modules (.bas) to my standard .exe.  I
have
| > one
| > | > | command button and 3 option radio buttons on the form.  When the
| > command
| > | > | button is "clicked" I need the code from the appropriate external
| > module
| > | > to
| > | > | be executed depending on which option radio button is selected.  
How
| > do
| > | I
| > | > | "call" the external module to run the code?
| > | > | --
| > | > | James McGril
| > | > | New VB Programmer

| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|



Sat, 20 Mar 2004 22:42:12 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. need to call external module

2. Need help/ calling external DLL from VB6

3. Need help/calling external DLLs from VB6

4. Returning data from asynchronusly called external module

5. Need help adding an ActiveX DLL to a project

6. Calling code in another project's module

7. calling procedures in modules of other projects

8. Error 50021 with Adding a bas Module to active Project

9. Accessing Project modules from Add-In

10. Adding a form to project creates module(*.bas)

11. Adding a form to project creates module(*.bas)

12. Need a pause when calling an external program!

 

 
Powered by phpBB® Forum Software