Scheduling VBA to Run and E-mail Every Hour
Let me start off by saying this is my first real time venturing into VBA. My only experience with it is when I hit the "Record Macro" button in Excel and maybe edit it to look at what it does. I'm in the process of taking some classes but until then, I need some help.
I have a report that I would like to have refreshed every hour and then e-mailed to a set of e-mail addresses. The current Macro is pretty basic. It essentially puts the current time into a few of tabs and then refreshes the ODBC connection.
Sub Refresh_Report2()
'
' Refresh_Report2 Macro
'
'
Sheets("Flow Chart").Select
Range("C5:D5").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("C5:D5").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Pulse").Select
Application.CutCopyMode = False
ActiveWorkbook.RefreshAll
End Sub
Ideally, I'm just able to leave a computer open and have it run the reports every hour and then send an e-mail to the team.
I've tried to read some of the options on how to do this and understand the pieces but it's putting all the pieces together that's difficult for me. I still need it to do the above every hour but I just need to add in the e-mail piece.
The name of the file is TG PWP Final1.xslm.
Any help is much apprecaited.
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago