Excel Automation - Command Buttons (control macros)

  • Thread starter Thread starter tcb
  • Start date Start date
T

tcb

I would like to create an Excel workbook with command buttons (AKA
control macros). I have code to create a workbook. Now I need to
know how to create Excel command buttons, then set properties and
assign macros to the command buttons in VBA from Access. The code on
the button would generally be simple like this:

Private Sub CommandButton1_Click()

Sheets("Tab One").Select

End Sub
 
However, I want to create theExcelworkbook fromAccess.

Hi

You could try code such as the following.

Sheet1.Shapes.AddOLEObject classType:="Forms.CommandButton.1"

Alok
 
Back
Top