ylvawandel, thanks for helping--your sample code is indeed correct. :)
But, please keep in mind that if someone says that a thread is a duplicate and posts a link to the other copy, as ChuckBing did in the first reply, the intention is for this thread to be abandoned, so that replies don't get duplicated, and all answers go in the same place. Duplicating replies wastes the time of everyone here--both the people trying to answer and the people who are asking the questions. Next time you see something like this and want to reply, please add the reply to the linked thread instead. :)
This is not intended to be an insult to you (sometimes people take things the wrong way here)--it is just standard advice for everyone using the forum. You are obviously new here (from your registration date and number of posts), and you are certainly quite welcome to post both questions and answers here.
Have a great day!