Help with Excel and CMD

Nutkin

New Member
Joined
Sep 12, 2011
Messages
2
Hi Guys,

You all seem quite knowledgable so I am hoping you can point me in the right direction.

I have an excell sheet with about 600 lines each generates a custom file generation code that can be launched from a cmd prompt in that directory.


Is there any way I can make a script in excell to give me a button that will copy the text from say Q3 and then type it into a command prompt at location C:\Directory\subdirectory

Then move on and loop until it reaches Q647 or a blank cell.

Ive dabbled with either side before but never tried to link the beasts.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
What is the actual text in Q3, for example? Is it the name of a program, or parameter to a program, or both?

The Shell function might do what you want, but you need to specify a program to be executed and maybe command line parameters in the first argument:

Code:
Shell "C:\Directory\subdirectory\your_program.exe " & Range("Q3").Text, vbNormalFocus
or maybe:
Code:
Shell "C:\Program Files\your_program.exe " & "C:\Directory\subdirectory\" & Range("Q3").Text, vbNormalFocus
 
Upvote 0

Forum statistics

Threads
1,224,575
Messages
6,179,637
Members
452,934
Latest member
Jdsonne31

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top