Hello Community!
Last time you've helped me in a great way, so hopefully you can do the same this time!
This time I'm stuck with the following, my model works great, but I want to open it on another computer.
My model excist of a .Mod file and an Excel File for input and output. I'm using a connection by ActiveX with Excel).
So in my code there are lines like
ExcelActiveX_Open([C:\Users\Roel\Desktop\Enterprise Dynamics Files\filename.xlsx], 0, InputAtoom),
If I send the file to a different computer I need to adjust those filenames manually, and I hope there is a way that is is done automatically....., if both files are in the same map on the arriving computer.
My question is, is it possible to send the Excel file and the Enterprise Dynamic model, and create the same connection on the other computer?
Hope you can help!
Roma
Connection Excel on another computer
Re: Connection Excel on another computer
Hello Roma,
The function CurDir gives a referral to the map of your model, so in your case this is "C:\Users\Roel\Desktop\Enterprise Dynamics Files". You can extend this referral by using your filename as the first parameter of this function. So instead of using ExcelActiveX_Open([C:\Users\Roel\Desktop\Enterprise Dynamics Files\filename.xlsx], 0, InputAtoom), use:
This should do the trick.
Regards,
Bart
The function CurDir gives a referral to the map of your model, so in your case this is "C:\Users\Roel\Desktop\Enterprise Dynamics Files". You can extend this referral by using your filename as the first parameter of this function. So instead of using ExcelActiveX_Open([C:\Users\Roel\Desktop\Enterprise Dynamics Files\filename.xlsx], 0, InputAtoom), use:
Code: Select all
ExcelActiveX_Open(CurDir([filename.xlsx]), 0, InputAtoom)
Regards,
Bart
Re: Connection Excel on another computer
Ha Bart,
Thank you very much! Exactly what I was looking for!
Roma
Thank you very much! Exactly what I was looking for!
Roma