I am using a macro to concatenate and sum values in a worksheet. It uses an array function in which it uses column numbers to put values in an array. With the column numbers "hardcoded" in the macro (e.g. myKeys = Array(1)), it works fine. But, when I created a userform so that I can change the values based on user input, I get a "Type Mismatch" error. Any ideas as to what I am doing wrong?
Attached is the workbook with both the working and non-working macro. Button labeled "No Form" is the one that is working, button labeled "Form" does work.
Bookmarks