If it is open and active you can use SendKeys. but you may need to make it
active first with AppActivate. Use AppActivate with the WIndow title (the
exact text shown in the title bar of your command prompt) and then SendKeys -
an example:
AppActivate "C:\WINNT\System32\command.com"
SendKeys ("dir{ENTER}")
for more info refer to help on these methods.
But depending on what you need to do with the command prompr there are other
and better ways - some built in VBA functions like FileFind or methods
available by adding a reference to the MS Scripting library. For more
advanced methods, it would be worth looking into these.