ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shell Command read Range and Loop (https://www.excelbanter.com/excel-programming/397847-shell-command-read-range-loop.html)

gcutter

Shell Command read Range and Loop
 
I have a table in Excel that is queried from Access and contains three numbers:
Nest# Time WC
3004 312 MC3
3005 100 MC3
5214 213 MC4
1254 111 MC2

What I want to do is run a shell command and loop through the table.
I cannot get the VBA Shell to read the Cells and I am not sure to Loop it
till A is null or empty.

Sub RunYourProgram()
Dim RetVal As Long
On Error Resume Next
RetVal = ShellExecute(0, "open", "F:\iMFG\IMrp\iMrp.exe", "/c" &
Range("C1") & " /e LV /w F:\iMFG\AccuFab\iLaser\ /t" & Range("B1") &
Range("A1"), _
"F:\iMFG\IMrp\", SW_SHOW)
End Sub

Any help would be great,
Greg


All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com