Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send variable to other program

Posted on 1999-07-01
12
Medium Priority
?
156 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

722 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