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 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago