rudedawg17
New Member
- Joined
- Oct 7, 2013
- Messages
- 1
I am having issues with this code calling the public function EditEntry on frmRunEntry
Private Sub CommandButton1_Click()
End Sub
'Which calls this Function
Public Function EditEntry(logNumber As Long)
findItem = Application.Match(logNumber, Sheets("Data").Range("A:A"), 0)
.....
End Function
Private Sub CommandButton1_Click()
Dim Response As Long
Dim RowNum As Variant
Dim RowNum As Variant
'Get the record ID from the user
Response = InputBox("Please enter the ID number")
'Test the user input for a valid ID number
If IsNumeric(Response) Then
Response = InputBox("Please enter the ID number")
'Test the user input for a valid ID number
If IsNumeric(Response) Then
RowNum = Application.Match(CDbl(Response), Sheets("data").Range("A:A"), 0)
If Not IsError(RowNum) Then
frmRunEntry.EditEntry Response ' Error occurs here stating Object Required
Else
MsgBox ("Record not found!")
End If
Else
MsgBox ("Please key in the ID number as shown in column A")
Exit Sub
End If
End Sub
'Which calls this Function
Public Function EditEntry(logNumber As Long)
Dim findItem As Variant
findItem = Application.Match(logNumber, Sheets("Data").Range("A:A"), 0)
.....
End Function