I've got a piece of code that adds the values in cells J12:J30 together and gives the total. In theory this should work:

Set Comm = Worksheets("Sheet2").Range("J12:J50")
showComm = Application.WorksheetFunction.Sum(Comm)
MsgBox showComm

I keep getting a "Subscript out of range" error. Any ideas?