View Single Post
 
Old 08-25-2019, 09:19 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Glad it works.
Any issues applying it to your real worksheet just come back and ask, we can sort it out.

Your second post wasn't there for me when I made my second post and I never received email notification of it.

Quote:
In Excel > Developer > Visual Basic, there are 8 items under Modules.
Of course, zzChangeLog is not really neccesary, but I'll leave it there.
And zAntiquatedCode is also probably not used?
mUI is empty. Why is it there?
What the heck are you talking about ?
The workbook I posted has all the code on the test255 sheet module, that's it, no other modules exist.
Do you have more than one workbook open ?

Quote:
how does the operable Link get into column A?
I don't see how column A cells are filled.
That's what the AddHyperlink sub did when it was run, and it only needed to be run once, although
if you changed the TextToDisplay and did run it again it would have overwritten the existing hyperlinks.
I left it in so you could see how the links were done.
The range of email addresses is hard coded to range("B10:B30") then for each cell in that range the hyperlink is built in the cell offset 1 column to the left (the -1).

I don't know what your actual text will be in the cells for the email body.
Based on what you have in the worksheet you attached, I would change the body line in the code so the line feeds are changed.
Code:
    body = Replace(Range("D" & lnkrw), "%0D%0A", Chr(10)) & Replace(Range("E" & lnkrw), "%0D%0A", Chr(10))
Reply With Quote