- 0
[VBA] Some Scripting Help in Excel?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Dropbox adds Microsoft 365 real time co-authoring support in beta
By John Callaham,
- 0 replies
- 2 views
-
Microsoft 365 Roadmap Weekly: Designer is coming to Word and more
By John Callaham,
- microsoft
- microsoft 365
- (and 7 more)
- 0 replies
- 4 views
-
Microsoft 365 Roadmap Weekly: New Copilot features are coming to Word, Excel and more
By John Callaham,
- microsoft
- microsoft 365
- (and 5 more)
- 1 reply
- 4 views
-
Microsoft Excel on the web users can now share links to existing or new Sheet views
By John Callaham,
- 1 reply
- 2 views
-
Microsoft 365 Insiders can preview Check Performance in the Excel Windows app
By John Callaham,
- microsoft
- microsoft 365
- (and 3 more)
- 1 reply
- 1 view
-
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
Share on other sites
3 answers to this question
Recommended Posts