Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Can I use VBA script to delete xlsx files from inside Mathcad?
Solved! Go to Solution.
Hi ,
there was an old thread to delete files.
either
search "delete file"
or try
http://communities.ptc.com/message/157493#157493
regards
Andy
What does you mean by delete xlsx files? Do you mean references?
An excel file in xlsx format
It is not referenses but old ouput files from mathcad, that should beleted not to mix up with fresh calculation results.
Can you post an example. From my understanding you have a Mathcad file which writes the results to an external .xlsx file?
Hi ,
there was an old thread to delete files.
either
search "delete file"
or try
http://communities.ptc.com/message/157493#157493
regards
Andy
The tread had a mcd-file with code I could use. Thanks!
It attached my be of some use also. It allows the file path to be extracted by selecting the input file.
However, it is not working on my Windows 8.1 machine, but did on earlier versions of Windows.
Helena Jacobsson Sandlund wrote:
Can I use VBA script to delete xlsx files from inside Mathcad?
Yes, you can. Use a scriptable compononent - typically the button or tickbox control, right-click on it and choose Edit Script from the context menu. Then write your VBScript to delete the files. You can set up the control so that you can hard code the list into the control or create an array of files names in Mathcad and pass that array to the control (as an input).
Stuart