Question: I am trying to learn how to make a program in C++ that when you run it, you can tell it to run and specify options all in one line. For example you can do `ipconfig /all` in CMD and it runs ipconfig.exe with the option `/all`. Another example would be `shutdown -f` which tells the computer to shutdown with the option `-f`. For example, I want to make a program that downloads something from a URL and call it for example downloader. From command line one would type `downloader <http://filehere.com> /h` which would download the file with the /h option which I would define its property in my program. I don't want code or guides on how to make a downloader I am just trying to learn how to specify options like the /h. Are there any guides out there that you know of and could post or any sample code? I have tried searching for guides, but I think I just don't know what this operation is actually called. Thank you.

Answer: 
I realize it's an old post and this solution might not have been available in the past but you can insert an ActiveX control element and have "Microsoft Forms 2.0 Frame" to control the information.

You will also need to create a custom class to handle the button presses since you can't attach macros directly onto them like a normal button.

Here is an example of mine:

**buttonEventHandler**

```
Option Explicit

Public Sub Click(Sender As Integer)

End Sub

```

**xButton**

```
Private WithEvents btn As MSForms.commandButton
Private bEventHandler As buttonEventHandler
Private b As Integer

Public Sub createObject(EventHandlerOf As MSForms.commandButton, EventHandler As buttonEventHandler, xB As Integer)
    Set btn = EventHandlerOf
    Set bEventHandler = EventHandler
    b = xB
End Sub

Private Sub btn_Click()
    If Not bEventHandler Is Nothing Then bEventHandler.Click (b)
End Sub

```

**in Microsoft Excel Objects: thisWorkbook**

```
Public Sub buttonEventHandler_Click(Sender As Integer)
Select Case Sender
Case 1
    'Do Stuff
End Select
End Sub

Private Sub workbook_open()
Sheet1.Frame1.Activate
Set xbtn = New Collection
Dim o As Object

Dim xB As New XButton
xB.createObject Sheet1.Frame1.Controls("excelCommandButton"), ThisWorkbook, 1
xbtn.Add xB
Set xB = Nothing
End Sub

```
You could place MyForm.Show code on the Workbook.Open event to launch the form whenever you open the file... that I've done. You can even choose where to place the form.

Your wish, if possible (I'm pretty positive it's not), could trigger concurrent VB code: e.g. auto-calculate of cells, and the form code. That's an issue because XL is single VBA thread, hence it's impossible to have two things happening. Either the form is showing and it's code is running, or XL application is running and doing cells/graphs/etc stuff.