I need a function to help me determine if a value in a 2D array is present within another 2D array. I attempted to refactor a previous function which worked in this question. I've came across errors such Byref argument type mismatch
(in which thereafter I added the ByVal statements) as well as the current error I am facing function call on left-hand side of assignment
.
Public aLogic As Variant
Public Field_List(1 To 70, 1 To 10) As String, Field_No_of_Rows As Long
Sub Implement_Mapping()
Dim aMapRow As Integer, aMapCol As Integer
For aMapRow = LBound(aLogic, 1) To UBound(aLogic, 1)
For aMapCol = LBound(aLogic, 2) To UBound(aLogic, 2)
If IsInArrayByVal(aLogic(aMapRow, aMapCol), Field_List) = True Then
Debug.Print aLogic(aMapRow, aMapCol)
'For Each Break In ObjLSL
'Next
End If
Next aMapCol
Next aMapRow
End Sub
Function IsInArrayByVal(ByVal stringToBeFound As String, ByVal arr As Variant) As Boolean
IsInArray = Not IsError(Application.Match(stringToBeFound, Application.Index(arr, 0, 1), 0))