I've found this a little hard to find, so I decided to share with you guys.
This small code will allow your app to accept arguments.
Just copy the whole code into the main sub (I didn't tested elsewhere) and edit the code inside the for to do what you want. Voila! It works.
Hope it helps!