I get a run time error 5 (Invalid Procedure or Argument) in the compiled version of my program only, when trying to use the MsgBox Function to display a message in a Click Event Procedure.
Here's the Procedure:
Private Sub Check5_Click(Index As Integer)
On Error Resume Next
'Countem to make sure there's no overvote.
CountChecks(5) = 0
MaxVotes = 2
Call CountemUp5(Index, MaxVotes)
If TooMany Then OverVoteMsg
End Sub
Here's the message:
Public Sub OverVoteMsg()
Response = MsgBox("You cannot exceed the maximum number of votes allowed in this category."
If Response = 1 Then TooMany = False
End Sub
I have determined that the error is generated only if I use the MSgBox Function, and only in the compiled program.
Can anybody help?
Here's the Procedure:
Private Sub Check5_Click(Index As Integer)
On Error Resume Next
'Countem to make sure there's no overvote.
CountChecks(5) = 0
MaxVotes = 2
Call CountemUp5(Index, MaxVotes)
If TooMany Then OverVoteMsg
End Sub
Here's the message:
Public Sub OverVoteMsg()
Response = MsgBox("You cannot exceed the maximum number of votes allowed in this category."
If Response = 1 Then TooMany = False
End Sub
I have determined that the error is generated only if I use the MSgBox Function, and only in the compiled program.
Can anybody help?