Reputation: 13
Sorry, I'm a beginner with VB6. I have this:
Private Sub Command5_Click()
If MessageBox.Show("Sei sicuro di voler uscire?", "Sicuro?", MessageBoxButtons.YesNo) = DialogResult.Yes Then
Unload Me
End If
End Sub
But it returns an error:
Run-time error '424':
Object required
Please, may anyone answer my question?
Upvotes: 1
Views: 2055
Reputation: 224867
MessageBox.Show
and MessageBoxButtons
are .NET things. (Why aren’t you using .NET, by the way? :)
) Here’s what it looks like in VB6:
If MsgBox("Sei sicuro di voler uscire?", vbYesNo, "Sicuro?") = vbYes Then
Upvotes: 5