I have read a few threads that talk about running a macro upon workbook open at a certain time. I get this error
"Cannot run the macro "C:\Doctments and Settings\JBRANUM\Application Data\Microsoft\Excel\XLSTART\personal.xls'!DAILYROLLFORWARD'. The macro may not be available in this workbook or all marcos may be disabled."
Under File - Options - Trust center - Macro Settings - I have "Enable all marcos..." enabled and all of my macros are inside the workbook personal.xls.
In ThisWorkbook module i have this
Private Sub Workbook_Open()
Application.OnTime TimeValue("10:00:00"), "DAILYROLLFORWARD"
End Sub
The macro I want to run is also in personal.xls and here it is
Private Declare Function LockWorkStation Lib "user32.dll" () As Long
Sub DAILYROLLFORWARD()
'
' DAILYROLLFORWARD Macro
'
Dim DtRNG As Range, Dt As Range
Set DtRNG = Sheets("Sheet1").Range("A:A").SpecialCells(xlConstants)
For Each Dt In DtRNG
'================extra code went here==========================================
Next Dt
LockWorkStation
End Sub
Any ideas how to fix my error? Thanks to everyone in advance.
Bookmarks