how can i create a function to browse a file in my computer

<pre class="tw-ta tw-data-text tw-text-small" data-fulltext="" data-placeholder="Translation" dir="ltr" style="text-align: left;"><span lang="en"><span lang="en">Hello everyone, <br>I work on a macro that can extract different properties from an assembly (names of parts, mass, volume etc ...) <br>and display them in an excel file.<br></span></span><p class="tw-swapa"></p><span lang="en"></span>
<span lang="en">For the moment my macro displays these properties in an excel file but it requires that an assembly file need to be<br>ALREADY open.<br><span lang="en"></span></span>
<span lang="en"><span lang="en">What I would like:<br>When the macro starts, a window appears and offers to browse the files in my computer to open a file ASSEMBLY preferably. <br>And when I select the desired assembly file, the properties extracted to the excel file are extracted FROM THE SELECTED <br>ASSEMBLY.<br><span lang="en">because for the moment, I succeed to display the window to browse a file but no matter which assembly I will select, <br>the properties extracted to the excel file will be those of the assembly already open</span><span lang="en">because for the moment,<br> I managed to display the window to browse a file but no matter which assembly I will select, the properties <br>extracted to the excel file will be those of the assembly already open and not the assembly file that I selected with <br>the function "browse".<br><span lang="en">I hope I have been clear enough and someone can help me. <br><span lang="en">I am attaching my current program for you to edit. <br>thank you in advance.<br><br>Romain AUBERT.</span></span></span><br></span></span>
SolidworksMysolidworks
Answers 0