Sufiyan97
Well-known Member
- Joined
- Apr 12, 2019
- Messages
- 1,538
- Office Version
- 365
- 2013
- Platform
- Windows
Need help with the error in th code
VBA Code:
Sub SolutionChecker()
If UserForm1.CommandButton1.Caption = "1" And UserForm1.CommandButton2.Caption = "2" And UserForm1.CommandButton3.Caption = "3" And
UserForm1.CommandButton4.Caption = "4" And UserForm1.CommandButton5.Caption = "5" And UserForm1.CommandButton6.Caption = "6" And
UserForm1.CommandButton7.Caption = "7" And UserForm1.CommandButton8.Caption = "8" And UserForm1.CommandButton6.Caption = "9" And
UserForm1.CommandButton10.Caption = "10" And UserForm1.CommandButton11.Caption = "11" And UserForm1.CommandButton12.Caption = "12" And
UserForm1.CommandButton13.Caption = "13" And UserForm1.CommandButton14.Caption = "14" And UserForm1.CommandButton15.Caption = "15"
MsgBox ("Well done, you are a Dazzling Star")
End If
UserForm1.Count = UserForm1.Count + 1
UserForm1.Caption = "Number of Clicks " & UserForm1.Count
UserForm1.TextBox1.Text = UserForm1.Caption
End Sub