corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Vbasic help please


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Vbasic help please
Leighton
Member

Avatar

Registered: 21st Feb 01
Location: Liverpool
User status: Offline
31st Jan 08 at 12:46   View Garage View User's Profile U2U Member Reply With Quote

in work a guy is trying to setup a auto email thing from a excel spreddy.
he has go it to work but he has a problem with email addreses.
in the vb text to lookup the email address on the work sheet the below is used

For Each sh In ThisWorkbook.Worksheets
If sh.Range("A1").Value Like "?*@?*.?*" Then

so presumably this means this will search and use email addresses such as
test@test.com?

however a lot of contacts on the list use have more "dots" in their addresses. for
example john.smith@uk.test.com

how do i include this in the vb text to pick up Value Like "?*@?*.?*" AND
"?*.?*@?*.?*" AND ALSO "?*.?*@?*.?*.?*"

is there a way to make it look for these as well?

Thanks
JamesMG
Member

Registered: 14th Nov 06
Location: Newcastle-under-Lyme, Staffordshire
User status: Offline
31st Jan 08 at 15:14   View User's Profile U2U Member Reply With Quote

whats the format of the sheet? depends on what data is being used etc.. could you not just use @ to find the addresses? so just use "?*@?*" either that or if all the email addresses are within the same column just use reciprication and stick them into an array
Paul_J
Member

Registered: 6th Jun 02
Location: London
User status: Offline
31st Jan 08 at 16:00   View User's Profile U2U Member Reply With Quote

I don't understand? why not just have a column for email addresses...

and also why search for the . at all?

So have 2 columns

1 column contains Name of staff

2nd column contains Email address..


You want to find email address for person 'Jim Bowens'

So you get the System to search column A for the value Jim Bowens... When found you use that row number, to then get the value of the cell Column B (that row num) ... thus you now have the Email address for Jim Bowens.

 
New Topic

New Poll

Corsa Sport » Message Board » Off Day » Geek Day » Vbasic help please 24 database queries in 0.0109391 seconds