I
ina
So Hello,
I would like to save only the results of my sheets not the macro that
generates it so I have done this:
Sub workbook_open()
Dim dtmSave As Date
Dim dtmSave As Date
OpenProgram 'Macro that open PackHedge
Application.Cursor = xlWait ' Cursor in clock shape
DoEvents
On Error Resume Next
dtmTime = Now + TimeValue("00:00:07") 'After seven seconds the
macros has been launched
Application.OnTime dtmTime, "thisworkbook.operations" 'Open the
sub in thisworkbook
Application.Cursor = xlDefault
Application.DisplayAlerts = False
Sheets(Array("Read Me", "File ", "Pages", "Values")).Copy
ActiveWorkbook.SaveAs Filename:= _
"C:\test\test_save.xls", ReadOnlyRecommended:=False,
CreateBackup:=False
Application.DisplayAlerts = True
dtmSave = dtmTime + TimeValue("00:00:30")
Application.OnTime dtmSave, "thisworkbook.Save_Exit"
End Sub
....
My original file is test and I would like to have only the result in
test1 and not in test. The trick is that I have the result in test and
this code delete all the module of my test_save.xls and that's all.
How can I do to delete the macro only and keep the result? i already
try to do a macro in order (using vbcomponents) to delete it but
didn't work.
Ina
I would like to save only the results of my sheets not the macro that
generates it so I have done this:
Sub workbook_open()
Dim dtmSave As Date
Dim dtmSave As Date
OpenProgram 'Macro that open PackHedge
Application.Cursor = xlWait ' Cursor in clock shape
DoEvents
On Error Resume Next
dtmTime = Now + TimeValue("00:00:07") 'After seven seconds the
macros has been launched
Application.OnTime dtmTime, "thisworkbook.operations" 'Open the
sub in thisworkbook
Application.Cursor = xlDefault
Application.DisplayAlerts = False
Sheets(Array("Read Me", "File ", "Pages", "Values")).Copy
ActiveWorkbook.SaveAs Filename:= _
"C:\test\test_save.xls", ReadOnlyRecommended:=False,
CreateBackup:=False
Application.DisplayAlerts = True
dtmSave = dtmTime + TimeValue("00:00:30")
Application.OnTime dtmSave, "thisworkbook.Save_Exit"
End Sub
....
My original file is test and I would like to have only the result in
test1 and not in test. The trick is that I have the result in test and
this code delete all the module of my test_save.xls and that's all.
How can I do to delete the macro only and keep the result? i already
try to do a macro in order (using vbcomponents) to delete it but
didn't work.
Ina