vbQuestion error

  • Thread starter Thread starter vanderlej
  • Start date Start date
V

vanderlej

hello
i need a solution for this:
click on a button should raise "vbquestion" popup window, but all i get is
"Activex component can't object".
why?!
thanks
 
vanderlej said:
i need a solution for this:
click on a button should raise "vbquestion" popup window, but all i
get is "Activex component can't object".
why?!

It's a bit easier to diagnose error messages if we can see the code that is
causing them. Can you post the code behind the button click?
 
Private Sub frmZPP_Delete(RowIndex As Long)
Dim m_Query As ADODB.Command
On Error GoTo errLabel

If Alert(vbQuestion, "Are you sure", "Yes/No") = 1 Then <-- this is
where the error raises
rsZP.AbsolutePosition = RowIndex
Set m_Query = CreateQuery("spStoreProcedure")
m_Query.Parameters!Action = 3
m_Query.Parameters!ParStruId = rsZP!ParStruId
m_Query.Execute

rsZP.Delete adAffectCurrent
JGrid.Grid.ItemCount = rsZP.RecordCount
JGrid.Grid.Refetch 1


End If
Exit Sub
errLabel:
MsgBox Err.Description

End Sub
 
vanderlej said:
If Alert(vbQuestion, "Are you sure", "Yes/No") = 1 Then <--
this is where the error raises

Alert() isn't a standard VB.net function. It seems reasonable to assume that
the error is occurring inside it.

What is the code for the Alert() function? Does it use any COM components?
Are they installed and registered on your system? If everything looks
correct, post the code for Alert() and tell us which line that fails on.
 
vanderlej said:
Private Sub frmZPP_Delete(RowIndex As Long)
Dim m_Query As ADODB.Command
On Error GoTo errLabel

If Alert(vbQuestion, "Are you sure", "Yes/No") = 1 Then <-- this is
where the error raises
rsZP.AbsolutePosition = RowIndex
Set m_Query = CreateQuery("spStoreProcedure")
m_Query.Parameters!Action = 3
m_Query.Parameters!ParStruId = rsZP!ParStruId
m_Query.Execute

.... looks like Classic VB code. You may want to post your question to a
Classic VB group (hierarchy "microsoft.public.vb.*").
 
Back
Top