Microsoft Developer Network > Forums Home > Microsoft ISV Community Center Forums > Visual Basic for Applications (VBA) > I have to do a manual saveas before shell and wait function works correctly
Ask a questionAsk a question
 

AnswerI have to do a manual saveas before shell and wait function works correctly

  • Monday, November 02, 2009 2:52 PMRyanMD Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am using an excel vba program to open either a .exe or .bat file. Because I have to wait for the external program to finish before I can continue I am using shell and wait methods I have come across on different user forums. However, independent of the module I use for shell and wait, I cannot open my spreadsheet and run the code directly. I have to do a manual saveas and rename the file; which after doing so my vba code works perfecrtly.

    Thanks

    • Moved byJeff ShanMSFTTuesday, November 03, 2009 10:31 AMvba question (From:Visual Basic General)
    •  

Answers

  • Monday, November 02, 2009 2:53 PMMalange Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    I am using an excel vba program to open either a .exe or .bat file. Because I have to wait for the external program to finish before I can continue I am using shell and wait methods I have come across on different user forums. However, independent of the module I use for shell and wait, I cannot open my spreadsheet and run the code directly. I have to do a manual saveas and rename the file; which after doing so my vba code works perfecrtly.

    Thanks

    Post your VBA question here please:

    http://social.msdn.microsoft.com/Forums/en-US/isvvba/threads

    Thanks
    Don't judge me, just Upgrade me. Thanks!

All Replies

  • Monday, November 02, 2009 2:53 PMMalange Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    I am using an excel vba program to open either a .exe or .bat file. Because I have to wait for the external program to finish before I can continue I am using shell and wait methods I have come across on different user forums. However, independent of the module I use for shell and wait, I cannot open my spreadsheet and run the code directly. I have to do a manual saveas and rename the file; which after doing so my vba code works perfecrtly.

    Thanks

    Post your VBA question here please:

    http://social.msdn.microsoft.com/Forums/en-US/isvvba/threads

    Thanks
    Don't judge me, just Upgrade me. Thanks!
  • Monday, November 02, 2009 2:57 PMRyanMD Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks