• 5 Subscribers

I have a function that changes data from an excel spreadsheet into SQL update or insert statements. For the Update section of it, I have up to 4 variables that can get entered into the where clause, but I was wondering if you guys know how to add parameters indefinitely like the SUMIFS function. Here are the parameter declarations:

Public Function SQLCode(Fctn As String, TBL As String, rRange As Range, Optional Where1 As Variant, Optional Where2 As Variant, Optional Where3 As Variant, Optional Where4 As Variant) As String

Do I have any options aside from adding like 20 parameters and hoping nobody needs more than that?

0 answers in total

Answer this questsion