excel - VBA Shell command no longer working -


heyho,

earlier today ran issues shell command in vba using excel2010 64bit. have fixed them hardcoded workaround, know why stopped working.

here code snipped:

dim mypath string dim myfolder string  mypath = "d:\somefolder\" myfolder = "somesubfolder\"  shell mypath & myfolder & "some.bat" 

until 2 weeks ago, consistently executing bat, stopped working.

i have played around bit , checked other syntaxes using shell command , have yet make sense of it. whenever tried execute snipped

"runtime error 5, invalid procedure call or argument" 

however, working 2 weeks ago, , haven't touched file. according ms documentation other arguments shell optional cannot problem.

in end, instead of looping through directories, hardcoded paths in multiple commands this:

shell """fullpath_to_.bat-files""" 

funny thing is, have multiple other vba scripts use old syntax described further up, meaning combining strings described in first example.

i checked whether paths build different or if because of me changing hard-drives particular script in .bat not find give me clue why old syntax using no longer working.

i checked if included libraries or got tangled nothing. i'm @ loss. script running now, want understand why stopped working.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -