+ Reply to Thread
Results 1 to 4 of 4

Propper use of shell comand

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Sol, Earth
    MS-Off Ver
    Excel 2010
    Posts
    3

    Propper use of shell comand

    I am relatively new to VBA an have found many answers to my problems in different foums just like this. On thing I found that I should be able to run a program like this:

    Please Login or Register  to view this content.
    This does work and starts SSTe.exe. Now one of two things happen.

    The first (and far more frequent) one is that the SSTe.exe can not open a file it needs to run. (The file is located in the same directory and if I run SSTe.exe by double clicking on it I had never any problems.)

    The second case is that the program runs as designed (but that was only the case last night for a few hours - and I have no idea what was different then).

    Now my idea/hope is that I am sort of running the SSTe in a different location (other than "relativePath") but I would not know how that could be, especialy since the propper path is indicated at the top of the window.

    A second guess is that I might be running thee program with insufficient user rights.

    Do you have any ideas what could solve this somewhat (at least to me) mystical problem?

    Thanks in advance!

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Propper use of shell comand

    Had the workbook been saved when you executed the command?

    Does the path have any spaces in?

  3. #3
    Registered User
    Join Date
    11-15-2012
    Location
    Sol, Earth
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Propper use of shell comand

    Hi Kyle123,
    thanks for your reply.

    The workbook had been saved.
    The path had some spaces but I have eliminated them and the problem persists. I have also tried copying all needed files to c:\ and tried it there.

  4. #4
    Registered User
    Join Date
    11-15-2012
    Location
    Sol, Earth
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Propper use of shell comand

    I have now found a solution. Even though it requires a bit of extra.

    The code now looks like this:
    Please Login or Register  to view this content.
    Where the &relativePath is passed on to the SSTe.bat file that in turn runs the SSTe.exe located in that directory.

    The full solution fot the VBA problem can be found at the link below. (I hope it is ok that I am posting it here since I would like to relay close the case properly)

    http://stackoverflow.com/questions/9...tory-using-vba

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1