Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Start Macro Daily task
Is there a way to start a Macro with a daily task,( i.e. a switch of some
kind.) but not have the macro start everytime the sheet opens. I am trying to avoid using two different workbooks to accomplish this. -- Jeff |
#2
|
|||
|
|||
Start Macro Daily task
How about having the macro start everytime the workbook was opened, but then
check to see if it's already run: Option Explicit Sub auto_open() Dim LogWks As Worksheet Dim res As Variant Set LogWks = Worksheets("Log") res = Application.Match(CLng(Date), LogWks.Range("a:a"), 0) If IsNumeric(res) Then 'already run, do nothing Else With LogWks .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Value = Date .Parent.Save End With End If 'rest of stuff to do 'thisworkbook.Close savechanges:=false 'maybe End Sub GoBucks wrote: Is there a way to start a Macro with a daily task,( i.e. a switch of some kind.) but not have the macro start everytime the sheet opens. I am trying to avoid using two different workbooks to accomplish this. -- Jeff -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
Date macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) |