Browse for folder in SW Macro

I am trying to create SW macro with form and struggle to make this form working

When I click on the browse button need to open the "windows open dialogue" and select a folder

This folder should appear in the text box

Can someone please help me to make this work?

Macro attached

SolidworksApi macros