VBA Code to Create a Toggle Button

G

Guest

I am trying to create code that will look in a given path and add a toggle
button (or command button) to an existing user form for each file in the
folder that the path referenced. I would like the toggle button that is
added to be linked to code that will open the file that the button
references. For example if "MyFolder" contains:

Abc.xls
Def.Doc
Ghi.txt

I would like the code to create a button on "MyUserform" for each of the 3
files, that will open the file when the userform is activated and the
particular button is clicked. I envision the code that populates the
userform being in the "ThisWorkbook" module and running when the workbook is
opened.

Thanks for any help you can give me
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top