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


Passing parameters from one VB prog to another

Posted on 1999-07-27
Medium Priority
Last Modified: 2010-04-30
I have a CGI script, with which I want to send emails, trouble is, in some cases it may be many emails and the CGI program has to finish running quickly.

If I write a second program to do the e-mails how do I call it from my CGI program? Is it possible to pass it e-mail addresses and text to send. There may be upto 100 e-mails but the text should be the same. Can I pass the info. direct or should I use a file / registry.

If possible could anyone give me some example code with the correct syntax. Thanks very much in advance.  
Question by:andyknott
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
LVL 18

Expert Comment

ID: 1527747
I dont know CGI, but you would call the program thus


you would retrieve the command parameters using command$ in VB which you could parse or simply use.

i.e command$ = ""

in my example#

Or can CGI write to a text file, if so you can retrieve from a text file in VB real easily.

Author Comment

ID: 1527748
The CGI program is written in VB and can do most things that a normal VB program can. I was thinking about writting the e-mail addresses to windows registry, or to a text file which the email program opened.

I take it it would be easier to get the data from a file rather than pass it direct to the email program?

To start a program from a vb program what line of code is required?
LVL 10

Expert Comment

ID: 1527749
You might consider writing your mail program as an ActiveX .exe in which case you can write a fairly simple class to handle all the e-mail stuff and you can pass huge amounts of data both ways without having to resort to writing files.

Accepted Solution

timrupp earned 200 total points
ID: 1527750
The simplest way to start a program from a VB program is to use the shell command--Shell(pathname,[windowstyle])

For example to start notepad with the file autoexec.bat loaded you would do: Shell("Notepad autoexec.bat",1)


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…
Suggested Courses

715 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