View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Student Student is offline
external usenet poster
 
Posts: 29
Default procedure call error issue

Hello All, Thank you... up front, for what you do is greatly appreciated !

i want to execute a shell; however, the shell resides in multiple locations
and i want to set the path in an IF statement then append it to the name of
the
bat file

If LOBTitle = "doc" then
path = "\\snt27\Pro\FTP\"
elseif LOBTitle = "fac" then
path = "\\snt28\PEM\FTP\"
endif
pathName = path & "run_ftp.bat"
RetVal = Shell(pathName, 1)

the problem is I get a procedure call error when using "pathName" variable
instead of the exact path?

please help
thank you again