View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ExcelMonkey ExcelMonkey is offline
external usenet poster
 
Posts: 553
Default Error 5 on Shell Command

I am getting an "Error 5 Invalid procedure call or argument" on the following:

lStr_Dir = ThisWorkbook.Path
strDirectoryList = lStr_Dir & "\Directory"
Shell (strDirectoryList & ".bat"), vbHide '', vbMinimizedNoFocus

?strDirectoryList
\\CGAS114\Username\My Documents\The Folder\ExcelVBA\Directory

Is this due to the spaces in the path?

Thanks

EM