Tools Excel

How to make excel take a sampling distribution?
I need Excel to output each possible sample of size n from a small population. For example, a discrete population of three numbers X, Y and Z are 9 possible samples of size 2 (with replacement). I tried the tool Sampling in Excel, but this observation is based only gambling not give groups of potential samples. Any help on this would be greatly appreciated as I spent much time in this! Thanks
Use the following link to access a website that has complete code to do what you want with just a slight modification. http://en.allexperts.com/q/Excel-1059/Excel-VBA-list-combinations.htm
Microsoft Excel 2010