Index Control

Private Sub Form_Click()

Dim intNextIndex as Integer

Load CommandArray(IntNextIndex)


CommandArray(intNextIndex).Caption=”New Button”

CommandArray(intNextIndex).Move ScaleWidth/2-

CommandArray(intNextIndex).Width /2, ScaleHeight /2-

CommandArray(intNextIndex).Height /2

End Sub

Private sub CommandArray_Click(Index as Integer)

MsgBox “You clicked button” & Index

End Sub


create 1 Form and 4 buttons


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s