I had to filter set of records and return the count. I tried recording the steps using macro recorder and wrote this piece of function.
Not sure what is wrong. Checked the mandatory things like macro security enabled...Please Login or Register to view this content.
Any help will be appreciated
Moderators note: code tags added for you - this time
Bookmarks