As a follow-up to this question, where a userform allows the creation of x # of tabs in a multipage during runtime, each with the same controls, I am wondering how to set the .OnClick behaviour of the buttons. I am trying to achieve this with the following code:
For Each ctl In MultiPage1.Pages(NumSegs - 1).Controls
If TypeOf ctl Is MSForms.CommandButton Then
ctl.Name = "Segment" & NumSegs & "Button"
ctl.OnClick = "Span_Form_Click_Handler"
End If
Next
But of course there doesn't seem to be a .OnClick method...