- 0
[VBA] Some Scripting Help in Excel?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 0 replies
- 0 views
-
Microsoft Office 2019 for Windows license now only $24.97
By News Staff,
- neowin deals
- office 2019
- (and 8 more)
- 5 replies
- 0 views
-
A Windows, Mac Excel feature is being removed as it's too expensive for Microsoft to afford
By hellowalkman,
- microsoft
- microsoft 365
- (and 8 more)
- 4 replies
- 0 views
-
- 0 replies
- 0 views
-
Download AI and Business Rule Engines for Excel Power Users (worth $159.99) for free
By News Staff,
- ebook offer
- sponsored
- (and 3 more)
- 0 replies
- 0 views
-
Question
Nick H. Supervisor
Hi guys,
I've got a problem with a VBA script that someone created for Excel. This script is supposed to deal with four columns.
A - Name of user
B - email address of user
C - A value of "yes" or "no"
D - A column filled by the script (more on that in a second)
Here is the idea: When the macro is run, it will look at column C. If column C says, "Yes" then it will send an email to the address in Column B, automatically including the user's name (column A) at the top of the email. Once the email has been sent to the address, the script will fill column D with "send" so that when the script is run in future it knows not to send another message to that user.
Here is the script (taken from here which may also include a better explanation than I have):
My VBA coding ability isn't worth a penny, but from what I can see in that script it seems to make sense. Sure enough, when I have run a test the D column has populated with "send." But I do not receive an email.
This script is used in Excel 2010, trying to communicate with Outlook 2010 (both programs were open at the same time).
Can someone see an issue with the above script that I've missed? Or can someone think of an easier way of getting this kind of thing to work?
If anyone needs more information, let me know.
Cheers!
EDIT: I should have probably mentioned that I will be modifying the script at some stage so that it actually fits in with the exact task I'm trying to do, but for the moment I just want the "basic" script to work.
Also, if anyone has any tips for quick-learning VBA it would be appreciated.
Link to comment
https://www.neowin.net/forum/topic/1148764-vba-some-scripting-help-in-excel/Share on other sites
3 answers to this question
Recommended Posts