VBA - Create a series of buttons on a Excel worksheet

Ask a question




This example shows how to create two buttons to fill up two particular colum in an Excel spreadsheet.
  • Create a collection object (Class) grouping the "click" command ofeach button in a single sub.
  • It is part of collections of objects on a sheet and not a UserControl.

Tested on Excel 2000 and 2007




Workbook1.xls

You can modify the button properties, eg color....



Making use of collection class for events with an additional collecion objects for the properties.
Download project:

Excel - Set default width for validation lists
Excel (VBA) - Open Outlook and send a file