I have a code where if some buttons are selected its showing in a message box which was selected, but if no button was selected I want to show a message in the message box.
Here is the code, please make me understand, I tried by my own but its showing the error:
Else without If, or Expected End Of Statement:
Private Sub cmdBuild_Click()
Dim Message As String
Dim I As Integer
Message = PizzaWhere + vbCr
Message = Message + PizzaSize + " Pizza" + vbCr
Message = Message + PizzaCrust + vbCr
For I = 0 To 5
If chkTop(I).Value = vbChecked Then Message = Message _
+ chkTop(I).Caption + vbCr
Else
If chkTop(I).Value = vbUnchecked Then Message = Message _
+ "Cheese Only" + vbCr
Next I
MsgBox Message, vbOKOnly, "Your Pizza"
End If
End If
End Sub