This is one of two procedures I'm adopting to ease the burden of migrating parameters from a GUI user interface to batch processing.

The function "Sequence Of Operations" is ungainly, with an optional parameter for each of about three dozen controls on a mult1-page form.

As each control (on the GUI) is updated - clicked or exited - I write the value to the section "[MacroSection"]" in the INI file, so that the next session can pick up where we left off last time.
Thus this INI file section has as many key/value lines as the function "Sequence Of Operations" requires.
It struck me that processing the INI file line-by-line, replacing the "=" with a ":=" was the easiest way to generate VBA code to call the function in batch mode.
Once the user has a working set of parameters, a click on the command button "macromaker" spits out a three-line SUB that can be pasted into a template.

<pre>Public Const strcMacroSection As String = "MacroSection"

Function strProcessLines(ByVal strText As String) As String
Dim strResult As String
Do While Len(strText) > 0 ' process the file of data a line at a time
Dim strLine As String
strLine = strsplitat(strText, vbCrLf) ' get next line
If Len(strLine) > 0 Then ' line is not empty
If Left$(strLine, 1) = "[" Then ' we have reached the start of a new section
Exit Do
Dim lngEquals As Long
lngEquals = InStr(1, strLine, "=") ' locate the leftmost equals sign
If lngEquals > 0 Then ' if found
''' refabricate the line suitable for named parameters
strLine = Left$(strLine, lngEquals - 1) & ":=" & """" & Right$(strLine, Len(strLine) - lngEquals) & """"
''' return the line as is; Best Of Luck!
End If
strResult = strResult & strLine & "," ' append the parameter key and value to the previous result
End If
End If
strProcessLines = Left$(strResult, Len(strResult) - 1) ' drop the trailing comma
'Sub TESTstrProcessLines()
' ' Locate the INI file
' Dim strFile As String
' strFile = "Cocuments and SettingsChrisLApplication DataIdentIdent.ini"
' ' Obtain the data from the INI file
' Dim strData As String
' strData = UW.strGetFileData(strFile)
' ' Drop all text up to and including [MacroSection]
' Dim lngLeft As Long
' lngLeft = InStr(1, strData, strcMacroSection)
' If lngLeft > 0 Then
' strData = Right$(strData, Len(strData) - lngLeft - Len(strcMacroSection) - 2)
' Dim strResult As String
' strResult = strProcessLines(strData) ' modify each line of data
' strResult = vbTab & "msgbox Sequence Of Operations(" & strResult & ")" ' embraces with the call to the macro
' strResult = "Sub Test" & vbCrLf & strResult
' strResult = strResult & vbCrLf & "end sub"
' Call UW.PutFileData(strfixpath(ThisDocument.Path) & "Macro.bas", strResult) ' write to a fixed file.
' Else
' MsgBox "No macro section was found in " & strFile
' End If
'End Sub
End Function</pre>