I am new to VB and need help
I have the following script which basically works with 2 spreadsheets: Active Sheet & EmailList
....(Set EmailList = GetObject("G:\Departmen.......
The script looks up a vendor number in EmailList finds it and uses the correponding email address to send email.
So far so good.
Now the problem: if vendor number is not found on email list, I want to lookup the buyer number instead and use this address
basically what I need is the syntax to amount to: LOOKUP buyer email on EmailList WHERE buyerno = activesheet buyerno
I have the following script which basically works with 2 spreadsheets: Active Sheet & EmailList
....(Set EmailList = GetObject("G:\Departmen.......
The script looks up a vendor number in EmailList finds it and uses the correponding email address to send email.
So far so good.
Now the problem: if vendor number is not found on email list, I want to lookup the buyer number instead and use this address
basically what I need is the syntax to amount to: LOOKUP buyer email on EmailList WHERE buyerno = activesheet buyerno