5 Create your own Snake game in Excel VBA Create four hundred label fields
Jun 2, 2026•Channel
AI Analysis
Data from YouTube Data API v3•Updated Just now
Video Overview
Video Details
Published1 month ago
Duration5:36
Video IDdfWgpvWm148
Languageen
CategoryScience & Technology
PrivacyPublic
Made for KidsNo
Video TypeRegular Video
Performance Metrics
Views27
Likes0
Comments0
Engagement Rate0.00%
Likes per 100 views0.00
Comments per 1K views0.00
Video Tags
Description
Playlist:
https://www.youtube.com/watch?v=VU5_83BbJfo&list=PLcwMjDfa1J18TfjYmgy9CR9lr5MQx6W0v
Page:
https://excel.hpage.com/create
Create your own Snake game in Excel VBA. Create four hundred label fields.
Right-click the first sheet tab and select "View Code".
In the VBA editor, click the "Toolbox" icon. Left-click the "Label" control in the toolbox, and then left-click an empty space in "UserForm1". Label1 is now located in "UserForm1". Create four more labels in the same way, labeled Label2 through Label5.
With the left mouse button held down, select the five labels and format them: set their background color (.BackColor) to white, and set their height (.Height) and width (.Width) to 10.
Copy the five selected labels and paste five new labels.
Select the ten labels and copy them. Paste ten new labels.
Select the twenty labels and copy them. Insert four new sets, each containing twenty labels. UserForm1 now contains one hundred labels, from Label1 to Label100.
Select the one hundred labels and copy them. Paste three new sets, each containing one hundred labels. UserForm1 now contains four hundred labels, ranging from Label1 to Label400.
Double-click UserForm1 in the VBA editor with the left mouse button.
Enter the code from the video description into the "Activate" procedure.
Open the worksheet, and then open the input mask. The formatted labels, from Label1 to Label400, are displayed in the correct order.
''''''222222222222222222222
Dim ††† As Long
Dim SCHOT As Long
For ††† = 1 To 400
Me.Controls("Label" & CStr(†††)).BackColor = &HFFFFFF
Me.Controls("Label" & CStr(†††)).BackStyle = fmBackStyleOpaque
Me.Controls("Label" & CStr(†††)).BorderStyle = fmBorderStyleSingle
Me.Controls("Label" & CStr(†††)).BorderColor = &H0&
Me.Controls("Label" & CStr(†††)).Caption = ""
Me.Controls("Label" & CStr(†††)).Font.Size = 10
Me.Controls("Label" & CStr(†††)).Font.Bold = True
Me.Controls("Label" & CStr(†††)).Height = 17
Me.Controls("Label" & CStr(†††)).Width = 17
Next †††
For ††† = 1 To 20
For SCHOT = 1 To 20
Me.Controls("Label" & CStr(††† + ((SCHOT - 1) * 20))).Left = (SCHOT - 1) * 17 + 6
Me.Controls("Label" & CStr(††† + ((SCHOT - 1) * 20))).Top = ((††† - 1) * 18) + 6
Next SCHOT
Next †††
''''''222222222222222222222