Solved

VB EXE

Posted on 1998-12-17
5
286 Views
Last Modified: 2010-05-03
I have an exe with 2 bas  modules in a project and i need to pass command line arguments to the exe
how can i do this ?
0
Comment
Question by:sujmags
[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
5 Comments
 
LVL 2

Expert Comment

by:polygon
ID: 1451118
I can's exactly understand your question, but if you need to know the command parameters of your program, use Command function. And if you want to specify some parameters for the debugging of your program, use your projects properties to specify such.

BTW, while debugging you can never get the same parameters as when running an exe. This is because to run your project in a debug session, VB specifies it as a parameter to some exe.
0
 
LVL 1

Expert Comment

by:OeilNoir
ID: 1451119
i don't understand well the question either.. but if you mean you need to call an exe from your app and you need to pass parameters to it, then
simply use the "shell" command and write the prametres in it

Exemple :
shell "c:\test.exe /param1"
or
shell "c:\test.exe "  & strParam
0
 

Author Comment

by:sujmags
ID: 1451120
I'll make the question more clear,
this is the st that i have within my sub main ()
I have an exe which comprises of sub main and one more module , i need to pass commandline args for this exe.

submain has a st. like this , these values are passed directly but instead these have to be read from command line.
(given below is the sample module)

gbRetState = CheckParameters("c:\a.rpt", "12-Dec-98", "RPT01", "JOB01")

Public Sub Main()
   Dim RetVal As Boolean
   
 
 
 'Check parameters
   gbRetState = CheckParameters("c:\a.rpt", "12-Dec-98", "RPT01", "JOB01")
    If gbRetState = False Then
        Call ErrorFileUpdate("Process Status: Invalid parameter")
        Screen.MousePointer = gbArrow
        Exit Sub
    End If
   
 End Sub
0
 
LVL 1

Accepted Solution

by:
jeffcameron earned 10 total points
ID: 1451121
use the Command() function in VB to get parameters from the command line
0
 

Author Comment

by:sujmags
ID: 1451122
Thanks jeff, really appreciate the timely response
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Range to Select 5 56
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 67
VB6 - Convert HH:MM into Decimal 8 70
Advice in Xamarin 21 109
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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