Do you mean something like this??
' Get the active application
Dim oInvApp As Application
oInvApp = ThisApplication
' Get the active document
' This code assumes it's an assembly document
Dim oDoc As AssemblyDocument
oDoc = oInvApp.ActiveDocument
' Get the BOM object
Dim oBom As BOM
oBom = oDoc.ComponentDefinition.BOM
' Set the keys for row merging
Dim sKeys(1) As String
sKeys(0) = "Part1"
sKeys(1) = "Part2"
'Dim sList() As String
Dim booleanParam As Boolean
'Call oBom.GetPartNumberMergeSettings(booleanParam, sList)
booleanParam = InputRadioBox("Check", "MergeSetting ON", "MergeSetting OFF", booleanParam, Title := "Row merge setting")
' Set the Row Merge Settings
oBom.SetPartNumberMergeSettings(booleanParam, sKeys)
If you want to edit the keys for merging, you should edit this code. When adding a key also raise the array size. (1) is enough for 2 values because it's zero based.
' Set the keys for row merging
Dim sKeys(1) As String
sKeys(0) = "Part1"
sKeys(1) = "Part2"
Please kudo if this post was helpfull
Please accept as solution if your problem was solved
Inventor 2014 SP2