Arguments.exe demonstrates how to send a value (argument) to a program using the Start>Run>Open box Example: Args.exe XXX ' "XXX rec'd" will be displayed in the left box or Args.exe 1 ' "Arg 1 rec'd" will be displayed in the middle box or Args.exe ' will be displayed in the right box frmArgs.frm VERSION 5.00 Begin VB.Form frmArgs BorderStyle = 3 'Fixed Dialog Caption = " Arguments Recieved" ClientHeight = 2040 ClientLeft = 45 ClientTop = 330 ClientWidth = 4350 Icon = "frmArgs.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 2040 ScaleWidth = 4350 ShowInTaskbar = 0 'False StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdExit Caption = "E&xit" Height = 375 Left = 1560 TabIndex = 3 Top = 1320 Width = 1215 End Begin VB.Label lblArgs BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Height = 375 Index = 2 Left = 3000 TabIndex = 2 ToolTipText = " Type 123 in Shell" Top = 480 Width = 1215 End Begin VB.Label lblArgs BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Height = 375 Index = 1 Left = 1560 TabIndex = 1 ToolTipText = " Type 1 in Shell" Top = 480 Width = 1215 End Begin VB.Label lblArgs BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Height = 375 Index = 0 Left = 120 TabIndex = 0 ToolTipText = " Type XXX in Shell" Top = 480 Width = 1215 End End Attribute VB_Name = "frmArgs" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim arg1 As String ' Form Name: frmArgs.frm ' Author: Tyler Travis, Eruption Software ' www.travis-usa.com ' Date: 2/11/01 Private Sub cmdExit_Click() Unload Me End Sub Private Sub Form_Load() Dim intArg1 As Integer Dim strArg1 As String frmArgs.Visible = True strArg1 = Command If Command = "XXX" Then lblArgs(0).Caption = "XXX rec'd" ElseIf Command = 1 Then lblArgs(1).Caption = "Arg 1 rec'd" Else lblArgs(2).Caption = strArg1 & " rec'd" End If End Sub ============================= Args.vbp Type=Exe Form=frmArgs.frm Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM\stdole2.tlb#OLE Automation IconForm="frmArgs" Startup="frmArgs" HelpFile="" Title="Args" ExeName32="Args.exe" Command32="/c arg1" Name="Args" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="Eruption Software and Tyler Travis." CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 DebugStartupOption=0