My best suggestion is.... if you must create strings and commands within VBA that must then be run in command shell, use VBA to create a .bat file that holds all the commands and then use your shell method to execute the bat file, then delete the bat.