Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PASSING VARIABLE FROM ONE APP TO ANOTHER

Status
Not open for further replies.

skibum019

IS-IT--Management
Dec 13, 2001
25
US
How do I go about passing a variable from one application to another using VB6? I would like to have a main executable that starts a second, third, etc.. executable which then in turn start up based upon a variable passed from the first.
i.e. -
User selects "ACCOUNTING - ENTRY" in Main.exe
Main.exe sets variable "varFormName" to "frm_DataEntry"
Main.exe opens Accounting.exe
Accounting.exe evaluates variable "varFormName" and acts accordingly, opening "frm_DataEntry" instead of another form.
 
have a look at the command() function.

start your second program with the variable value as a parameter (e.g., Call Shell("Accounting.exe passed_value"))

modify the called program (e.g., Accounting.EXE) so that it checks the passed value (using the command() function).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top