I
ina
Hello I have this sub and since today I have this error the code stops
very strangely tell me that there is a code execution breaking. any
suggestions??
Public Sub Workbook_Open()
' ************
' Variables
' ************
Dim dtmTime As Date
Dim dtmSave As Date
Dim oExec As Object
' ************
' Call function OpenPHObject; in order to execute sub operations I need
to open this software
' ************
Set oExec = OpenPHObject()
' ************
' Cursor in clock shape
' ************
Application.Cursor = xlWait
DoEvents
On Error Resume Next
' ************
' After seven seconds the macros has been launched
' ************
dtmTime = Now + TimeValue("00:00:07")
' ************
' Open the sub in thisworkbook
' ************
Application.OnTime dtmTime, "thisworkbook.operations"
Application.Cursor = xlDefault
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"C:\test\testsave.xls", ReadOnlyRecommended:=False, CreateBackup:=False
'Application.DisplayAlerts = True
' ************
' Now + 7seconds + 30 seconds --> launch SAVEandEXIT and close PH
' ************
dtmSave = dtmTime + TimeValue("00:00:30")
Application.OnTime dtmSave, "thisWorkBook.Save_Exit"
End Sub
very strangely tell me that there is a code execution breaking. any
suggestions??
Public Sub Workbook_Open()
' ************
' Variables
' ************
Dim dtmTime As Date
Dim dtmSave As Date
Dim oExec As Object
' ************
' Call function OpenPHObject; in order to execute sub operations I need
to open this software
' ************
Set oExec = OpenPHObject()
' ************
' Cursor in clock shape
' ************
Application.Cursor = xlWait
DoEvents
On Error Resume Next
' ************
' After seven seconds the macros has been launched
' ************
dtmTime = Now + TimeValue("00:00:07")
' ************
' Open the sub in thisworkbook
' ************
Application.OnTime dtmTime, "thisworkbook.operations"
Application.Cursor = xlDefault
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"C:\test\testsave.xls", ReadOnlyRecommended:=False, CreateBackup:=False
'Application.DisplayAlerts = True
' ************
' Now + 7seconds + 30 seconds --> launch SAVEandEXIT and close PH
' ************
dtmSave = dtmTime + TimeValue("00:00:30")
Application.OnTime dtmSave, "thisWorkBook.Save_Exit"
End Sub