Searches for a setting value in set of Settings, in Excel spreadsheet using Setting_Value pairs.
Providing the SettingMask, the function will keep searching in these settings (SettingMask1, SettingMAsk2, etc) for that value until found, or until no other Mask found.
Needed to a very specific scenario in a tool I have here.
Todo: Allow user to search for mask like Setting1Mask, Setting2Mask, when we do not having number at end.
Function SettingNameAlreadyFound(SettingIDMask, SettingName)
' Checks if a value is already found among set of settingIDs
' Searching for all settings starting (SettingIDMask), like SettingIDMask1, SettingIDMask2, SettingIDMask3, etc...
' Needs SettingRead
' returns 0 if none found, 1 if at least 1 found
Rett = 0
If SettingName = "" Then GoTo NextX1
X1 = 1
Do Until X1 > MaxGroupSlots
SettingName1 = SettingRead(SettingIDMask & X1) ' SettingName1 = SettingRead("CustomSelectionName" & X1)
If SettingName1 = "N/A" Then GoTo NextX1
If UCase(SettingName1) = UCase(SettingName) Then
Rett = 1
Exit Do
End If
NextX1:
X1 = X1 + 1
Loop
SettingNameAlreadyFound = Rett
End Function
' Checks if a value is already found among set of settingIDs
' Searching for all settings starting (SettingIDMask), like SettingIDMask1, SettingIDMask2, SettingIDMask3, etc...
' Needs SettingRead
' returns 0 if none found, 1 if at least 1 found
Rett = 0
If SettingName = "" Then GoTo NextX1
X1 = 1
Do Until X1 > MaxGroupSlots
SettingName1 = SettingRead(SettingIDMask & X1) ' SettingName1 = SettingRead("CustomSelectionName" & X1)
If SettingName1 = "N/A" Then GoTo NextX1
If UCase(SettingName1) = UCase(SettingName) Then
Rett = 1
Exit Do
End If
NextX1:
X1 = X1 + 1
Loop
SettingNameAlreadyFound = Rett
End Function
SettingIDMask, SettingName
Views 94
Downloads 39
CodeID
DB ID