Passing variables to another WIN program

Posted on 1998-12-21
Last Modified: 2010-05-03
I would like to pass a variable to a windows program from my VB application. I am loading a Formflow form from my VB app. and in Formflow I shall search in the database for the variable I sent from VB. Anyone?
Question by:soft4u

Expert Comment

ID: 1451884
Hi !
I'm not sure why you need this but you can implement it in a easier way by stored the value in variable to a text file in HD and let the winapp access it.

Hope it'll help you.

Author Comment

ID: 1451885
You see I have a checklist in my VB interface. For each article number in the checklist there are forms to fill in or to just look at in Formflow. If an article no. in my checklist have certain form filled in in Formflow I would like to reach this by clicking a command button in VB and get right in to that form. Once that form is loaded it just has to find the record for my special article no. Hope you understand me, kind of hard to explain in a simple way.
Anyways, I don't like the idea of passing variables through a text file, there must be another way of passing variables.

LVL 18

Expert Comment

ID: 1451886
I'm not familiar with Formflow.  Is this an off-the-shelf application, or one you wrote?  Either way, if it supports DDE or OLE then you can pass variables back and forth.  Any idea if Formflow supports any of these?

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.


Author Comment

ID: 1451887
Yes it supports DDE and OLE. Formflow is the world leader in form management. It used to be owned by Delrina but it's now sold to Canadian company Jetform.

Hope you can help me
LVL 18

Expert Comment

ID: 1451888
Well, if it supports either one, then you're in luck... of the two, your best bet is probably OLE.  To understand how to use OLE with Formflow, you probably need some documentation from Formflow about what objects and methods they "expose" for you to work with in your VB program.  Try contacting Jetform to see if they have any sample VB code, as I'm sure this is a fairly common request for them.

If you'd like to have a go at it yourself, then I suggest that you look at the VB sample in


This sample uses Ole Automation to open up Excel, load a spreadsheet and read data from it.  The major difference is that this sample is not making Excel visible, and you'd probably want to make Formflow visible (you can do that too if you want).  But, this sample will get you started.

You may be able to see some of the objects and methods that Formflow "exposes" by going to your Project|References screen and seeing if you see a checkbox for Formflow object library (if so, check it).  Then, go to View|Object Browser.  Select the Formflow library in the dropdown listbox.  Any items you see are objects you could work with in your program.

Good Luck.

LVL 12

Expert Comment

ID: 1451889
You can also use SendKeys to "drive" a program from VB. I use this technique for automatic document retreival. I have a database with file/page references and I have my VB app open Adobe Reader and tell it which file to access and what page to display when the operator clicks on the item in a listbox. Works well.



Accepted Solution

jeffcameron earned 60 total points
ID: 1451890
To see if it supports ActiveX(OLE) Automation in your VB IDE goto the projects - references menu item and search through the list for anytthing that says formflow, or jetform.  If there is check it and hit ok. Then goto your object browser - F2 from your VB IDE.  Where it says <All libraries> in the combobox select the item that says formflow, jetform, etc.  This will show you all the items that formflow exposes.  From there you can use these objects in your program as if they were always there.  If the company did a good job developing it, there will be descriptions when you select the items.  If this item does not exist just in the references reject my answer.

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

770 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