Solved

how to read Command Line Arguments from VB program

Posted on 2000-05-01
1
159 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 50 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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
Course of the Month7 days, 7 hours left to enroll

632 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