View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA Code to Create a Toggle Button

Look he

http://j-walk.com/ss/excel/tips/userformtips.htm

--
Regards,
Tom Ogilvy


"Brandt" wrote in message
...
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