![]() |
Random Selection
Hi,
I have a subscriber email address list of over 20,000 Email addresses. I would like to be able to click a button on a sheet and a dialogue box appear displaying an Email address which has been randomly selected from the list. Is this possible? If so I would really appreciate some help on accomplishing this task. Also, on the dialogue box, would it be possible to have a button which when clicked, copies the address selected to the To... field of a new email in MS Outlook 2003. Regards John |
Random Selection
Hi
Something like this should act as a starter Dim lEmailRow As Long, sEmail As String lEmailRow = (Rnd() * 316) + 1 MsgBox Cells(lEmailRow, 1) Chnge 316 to reflect how many rows of data you actually have (I had 316!!). this assumes your list is in column A and there is no heading. As for your second question I believe the answer is yes but I don't actually have any experience of dealing with Outlook automation. ;-) "John" wrote in message ... Hi, I have a subscriber email address list of over 20,000 Email addresses. I would like to be able to click a button on a sheet and a dialogue box appear displaying an Email address which has been randomly selected from the list. Is this possible? If so I would really appreciate some help on accomplishing this task. Also, on the dialogue box, would it be possible to have a button which when clicked, copies the address selected to the To... field of a new email in MS Outlook 2003. Regards John |
Random Selection
Fantastic,
Just the job, pity about the automation bit. Kind Regards John "Loomah" wrote in message ... Hi Something like this should act as a starter Dim lEmailRow As Long, sEmail As String lEmailRow = (Rnd() * 316) + 1 MsgBox Cells(lEmailRow, 1) Chnge 316 to reflect how many rows of data you actually have (I had 316!!). this assumes your list is in column A and there is no heading. As for your second question I believe the answer is yes but I don't actually have any experience of dealing with Outlook automation. ;-) "John" wrote in message ... Hi, I have a subscriber email address list of over 20,000 Email addresses. I would like to be able to click a button on a sheet and a dialogue box appear displaying an Email address which has been randomly selected from the list. Is this possible? If so I would really appreciate some help on accomplishing this task. Also, on the dialogue box, would it be possible to have a button which when clicked, copies the address selected to the To... field of a new email in MS Outlook 2003. Regards John |
All times are GMT +1. The time now is 02:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com