FracinDean
Board Regular
- Joined
- Jul 11, 2011
- Messages
- 110
- Office Version
- 365
- Platform
- Windows
I have a large Excel model that has a lot of nested looping in the macros, and it is a stochastic model, so I am doing 100s to 1000s of trials for each simulation. The simulations will run in an acceptable amount of time (15-30 minutes) when the file is saved on the hard drive of the same computer that is running Excel; however, if the file is saved on another computer, the file either crashes Excel or it runs so slowly as to not be usable due to all the network data traffic (maybe this is called "latency"). If the user has made this mistake before with this model, they usually recognize the issue quickly, and they can just shut down Excel and resolve the issue. The big problem is when new model users have this issue, it can be very frustrating and sometimes take a long time before they realize something is wrong.
What I want to do is test to determine if the model is running on the same host where the file is saved and when it is not, abort the run and give the user a message telling them why the model was shut down. I think I can do this by looking for C:\ in the first three characters of the path for the workbook, which I think will only occur if the user has the file saved on the host that is running the Excel model.
I have two questions: 1) Do you know any reason testing for "C:\" in the file path will not work, and 2) do you know a better way to do this?
What I want to do is test to determine if the model is running on the same host where the file is saved and when it is not, abort the run and give the user a message telling them why the model was shut down. I think I can do this by looking for C:\ in the first three characters of the path for the workbook, which I think will only occur if the user has the file saved on the host that is running the Excel model.
I have two questions: 1) Do you know any reason testing for "C:\" in the file path will not work, and 2) do you know a better way to do this?