
How to get the excel file name / path in VBA.Displaying pictures from a file path on a Image control.
Set the value of an image control in the user form by referencing a file path. The write up is sooooooo much more complicated than the code. then get filenames (you can filter by extension with the arguments of Dir, just as you would in DOS).įinally, under OnClick and OnDoubleClick of the listbox, you must interpret the listbox default property (Item), check for "->" and use ChDir to change directory and repopulate, or you'll have your file selected. first get the Directories (and prefix a "->" or whatever prior to adding it on the listbox, so that the user understands this is not a file). To populate your listbox, use the Dir command (using method additem of the listbox). you want controls and buttons: Use listboxes! I could post the hack about using MSDIAG on VBA, that explainsīut you don't want Dialog Boxes. After re-re-reading your Q, it seams you want to steer away from dialog boxes!Oh well, I was going to say