?
Solved

Send variable to other program

Posted on 1999-07-01
12
Medium Priority
?
159 Views
Last Modified: 2012-05-04
How can I send a global variable from one vb program to another (not by using the sendkeys nor by a file) ?
0
Comment
Question by:Smout
  • 3
  • 2
  • 2
  • +5
12 Comments
 
LVL 2

Expert Comment

by:thew00d
ID: 1521310
I've done it using DDE before but its a pretty outdated way of doing things now that we have OLE.  Or you could use a registry setting but I suppose thats pretty close to using a file.

Thats my 2 cents
0
 
LVL 1

Expert Comment

by:jdunck
ID: 1521311
Is the 2nd VB program an EXE or DLL?
0
 

Author Comment

by:Smout
ID: 1521312
an exe
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 1

Expert Comment

by:jdunck
ID: 1521313
Can you be certain that the second program will be running?
And is the 2nd program an ActiveX EXE?
0
 
LVL 18

Expert Comment

by:deighton
ID: 1521314
An ole server perhaps
0
 
LVL 3

Accepted Solution

by:
BGillham earned 20 total points
ID: 1521315
user the SHELL Command with %1, %2 %3
/cmd cmdstring Specifies a command string to be passed to the Command$ function. When used, it must be the last switch on the command line.
If the Program is already running the you will have to either use a Public Class to accept the variable or user the Registry to temporarily store the Variable.

Hope this helps
0
 
LVL 1

Expert Comment

by:SiriusP
ID: 1521316
the program is already running
0
 
LVL 1

Expert Comment

by:SiriusP
ID: 1521317
?
0
 
LVL 3

Expert Comment

by:BGillham
ID: 1521318
If the @nd Program is written by you, you can add a public class and populate the as many variables as you want by setting the properties of that class.
0
 
LVL 3

Expert Comment

by:jjmartin
ID: 1521319
I have had pretty good success using a DLL to pass variables from one application to another.  You would have to be able to rewrite both applications to incorporate the use of a dll.  If this is a possibility, I can get more specific.
0
 

Expert Comment

by:davepcam1
ID: 1521320
i agree with BGillham, store it in the registry or make a link between applications
0
 
LVL 1

Expert Comment

by:SiriusP
ID: 1521321
can't use registry and linking gives me troubles when I update the program in the future

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question