kraamerica
Board Regular
- Joined
- Apr 7, 2020
- Messages
- 66
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
I'm trying to create a message box that will populate when all macros have run (there are 4 modules in the same workbook. I currently have them running all macros as such:
Sub Run_All_Macros()
Call TZ_Overnight
Call TZ_Today
Call TZ_24_Hours
Call TZ_7_Days_Out
MsgBox "All PFRC's Have Been Sent" (this is not working)
End Sub
I found another older thread (here) that has them running in Snippets but I am for sure inexperienced in that process, however would it be easier to run all macros from the same module to run them and create the message box that they have run from there?
*I'm also trying to create a follow-up to show all individual records (by count) sent as it pertains (separated) by the amount of records sent by each macro in 1 email. I have this that I started when I only had 1 macro/module running:
Set outlookmailitem = Nothing
Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.createitem(0)
'edress = "Name@Company.com"
subj = "NameTotal PFRC Sent" & " " & Date
With outlookmailitem
.to = "Name2@Company.com"
.cc = ""
.bcc = "Name3@company.com"
.Subject = subj
.body = "The total PFRC emails sent on " & " " & Date & " " & "was" & ":" & " " & count
End With
'outlookmailitem.display
outlookmailitem.send
I would like it to run the same as a total # in the subject line, but in that same email, break it out by macro/module:
Call TZ_Overnight - Count
Call TZ_Today - Count
Call TZ_24_Hours - Count
Call TZ_7_Days_Out - Count
**I can create a separate post for this last question if need be, but was trying not to clutter, so please advise and thank you!
Sub Run_All_Macros()
Call TZ_Overnight
Call TZ_Today
Call TZ_24_Hours
Call TZ_7_Days_Out
MsgBox "All PFRC's Have Been Sent" (this is not working)
End Sub
I found another older thread (here) that has them running in Snippets but I am for sure inexperienced in that process, however would it be easier to run all macros from the same module to run them and create the message box that they have run from there?
*I'm also trying to create a follow-up to show all individual records (by count) sent as it pertains (separated) by the amount of records sent by each macro in 1 email. I have this that I started when I only had 1 macro/module running:
Set outlookmailitem = Nothing
Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.createitem(0)
'edress = "Name@Company.com"
subj = "NameTotal PFRC Sent" & " " & Date
With outlookmailitem
.to = "Name2@Company.com"
.cc = ""
.bcc = "Name3@company.com"
.Subject = subj
.body = "The total PFRC emails sent on " & " " & Date & " " & "was" & ":" & " " & count
End With
'outlookmailitem.display
outlookmailitem.send
I would like it to run the same as a total # in the subject line, but in that same email, break it out by macro/module:
Call TZ_Overnight - Count
Call TZ_Today - Count
Call TZ_24_Hours - Count
Call TZ_7_Days_Out - Count
**I can create a separate post for this last question if need be, but was trying not to clutter, so please advise and thank you!