Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I am getting an error 'Sub or Function Not defined" on the line highlighted below:
I tried
with no luck receiving only 'Unable to get the Match property of the WorksheetFunction class'.
Is anyone able to provide any advice?
Rich (BB code):
Sub Button1_Click()
Dim wsh1 As Worksheet
Dim CRID As Integer
Dim PRID As Integer
Dim NRID As Integer
Set wsh1 = Worksheets("sheet1")
With wsh1
NRID = .Range("B10").Value = Application.WorksheetFunction.Index("A:A", Match("B10", "A:A", 0) + 1)
PRID = .Range("B10").Value = Application.WorksheetFunction.Index("A:A", Match("B10", "A:A", 0) - 1)
.Range("B11").Value = PRID
.Range("B12").Value = NRID
End With
End Sub
I tried
Rich (BB code):
NRID = .Range("B10").Value = Application.WorksheetFunction.Index("A:A", Application.WorksheetFunction.Match("B10", "A:A", 0) + 1)
Is anyone able to provide any advice?