Home » excel » vba – Excel functions in macros

vba – Excel functions in macros

Posted by: admin May 14, 2020 Leave a comment


How to use excel functions in macros?

I want to extract the month out of date format:

k = Application.WorksheetFunction.Month(Selection.Value) 

Should this not work?

How to&Answers:

When a worksheet function like MONTH has an exact equivalent native to VBA then its not available through Application.WorksheetFunction and you have to use the native VBA function as Siddarth has shown