Tag: function

VBA Function vs VBA Sub
Excel, MS Office, Outlook, PowerPoint, Word

Excel VBA Function vs VBA Sub – Excel Functions and Procedures

A VBA Function can accept parameters and return results. Functions, however, can’t be executed directly. On the other hand a VBA Sub procedure can be executed directly and can also accept parameters. Procedures, however, do not return values. We often use Subs and Functions often not thinking about their true potential and how much we […]

VBA ParamArray
Excel, MS Office, Outlook, PowerPoint, Tip of the Day, Word

The VBA ParamArray for a dynamic list of VBA arguments

Today’s VBA Tip of the Day concerns dynamic parameter declaration via the VBA ParamArray. When declaring Functions/Procedures in some cases you may need to specify Optional arguments. Let’s say we want to write a procedure that works similarly as other procedures you know natively from Excel like SUM: Now how would you create such a […]