Excel VBA object sub call with 2 object parameters gives compile error: expected =
问题 I am calling an object's subroutine in Microsoft excel vba. The sub has 2 parameters, both objects themselves. The line of code I typed is giving an error-> Compile Error: Expected = Here is the section of code that it occurs in: ' Copy the info from the old sheet and paste into the new sheet Dim employee as CEmployee For i = 2 To eswbMaxRow Set employee = New CEmployee employee.setNames (eswb.Worksheets("Employee Info").Cells(i, wbColumns.infoNameCol).value) employee.loadFromAnotherWorkbook