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

x
?
Solved

how to read Command Line Arguments from VB program

Posted on 2000-05-01
1
Medium Priority
?
160 Views
Last Modified: 2010-05-02
How to read Command Line Arguments from VB program.

what are the commands in VB.

in C we reads the arguments like that


main(int argc, *argv[])

0
Comment
Question by:david2001
[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
1 Comment
 

Accepted Solution

by:
khanate earned 200 total points
ID: 2765965
All "command line" input is stored in the command$ variable.  To work with it I usally but something in the form_load() sub, like

private sub form_load()
 if lcase($command) = "autostart" then
   call cmdStart_click
 endif
endsub

The nice thing about command$ is that it can be given either from the DOS box or from another program's shell() function.  Example:

private sub cmdStartOtherProgram_click()
 shell("c:\compiled_projects\other_project.exe autostart")
endsub
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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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 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…
Suggested Courses

664 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