I have a VB project HDSearch with Class SearchHDCallAction, the DLL of which is generated and in the same machine. the method SearchHDSeverity_QueryRecord in this class accepts an integer parameter and returns a recordset. Trying to execute this from a standalone VB form gives the error 'Object variable or With block variable not set'. Please help.
Private Sub SrchSeverity_Click()
Dim obj As HDSearch.SearchHDCallAction
Dim rs As New ADODB.Recordset
Set rs = obj.SearchHDSeverity_QueryRecord(20)
Do While Not rs.EOF
i = rs.Fields(0)
a = rs.Fields(1)
MsgBox i & " ** " & a
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.