See below what you ask for:
'1 form with
' 1 commandbutton: name=Command1 index=0
Option Explicit
Private Sub Command1_Click(Index As Integer)
Caption = CStr(Index)
End Sub
Private Sub Form_Load()
Dim lngIndex As Long
For lngIndex = 1 To 100
Load Command1(lngIndex)
Next lngIndex
For lngIndex = 0 To Command1.UBound
With Command1(lngIndex)
.Caption = CStr(lngIndex)
.Visible = True
End With 'With Command1(lngIndex)
Next lngIndex
End Sub
Private Sub Form_Resize()
Dim lngIndex As Long
Dim sngWidth As Single, sngHeight As Single
Dim lngRow As Long, lngCol As Long
sngWidth = ScaleWidth / 10
sngHeight = ScaleHeight / 10
For lngIndex = 0 To Command1.UBound
lngRow = lngIndex \ 10
lngCol = lngIndex Mod 10
Command1(lngIndex).Move lngCol * sngWidth, lngRow * sngHeight, sngWidth, sngHeight
Next lngIndex
End Sub
Be careful, since a lot of control over 1 form can significantly slow down the work.
If the seat layout is a good mesh, you might be better off using a mesh control (msflex)
Another option is to upload an image of the location map and allow the user to click on the image, after which you can use the X and Y coordinates to determine which location was clicked ... this way you can also use different colors in the image and get a color that user clicked to preselect seat type
Hrqls source
share