Object Required calling function on another form

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()
Dim Response As Long
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

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
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,215,948
Messages
6,127,871
Members
449,410
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top