1

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?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.