Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
What is the first event that occurs immediately after a workbook is done saving? There is a Before_Save event, but there is no After_Save event. I have a file that takes a while to save to the server. I wanted to time how long it takes to save. I thought about putting "Activecell = Now()" in the Before_Save event, then activate the cell below it. Then when it is done saving, put "Activecell = Now()" in the appropriate event procedure, but I don't know what that is. If anyone has a better way of doing this or any other suggestions, I'm all ears -- Thanks for any help anyone can provide, Conan Kelly |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
try something like this. just change the file path to your file path. Sub macTimer() ' Macro written 11/8/2006 by FSt1 Range("A1").FormulaR1C1 = "=NOW()" Range("A1").NumberFormat = "h:mm:ss" ActiveWorkbook.SaveAs Filename:= _ "C:YourFilePathGoesHere\deleteme.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Range("B1").FormulaR1C1 = "=NOW()" Range("B1").NumberFormat = "h:mm:ss" End Sub regards FSt1 "Conan Kelly" wrote: Hello all, What is the first event that occurs immediately after a workbook is done saving? There is a Before_Save event, but there is no After_Save event. I have a file that takes a while to save to the server. I wanted to time how long it takes to save. I thought about putting "Activecell = Now()" in the Before_Save event, then activate the cell below it. Then when it is done saving, put "Activecell = Now()" in the appropriate event procedure, but I don't know what that is. If anyone has a better way of doing this or any other suggestions, I'm all ears -- Thanks for any help anyone can provide, Conan Kelly |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In your sub routine you could use:
Activecell = Now() ThisWorkBook.Save Activecell.Offset(1,0) = Now() -- Best wishes, Jim "Conan Kelly" wrote: Hello all, What is the first event that occurs immediately after a workbook is done saving? There is a Before_Save event, but there is no After_Save event. I have a file that takes a while to save to the server. I wanted to time how long it takes to save. I thought about putting "Activecell = Now()" in the Before_Save event, then activate the cell below it. Then when it is done saving, put "Activecell = Now()" in the appropriate event procedure, but I don't know what that is. If anyone has a better way of doing this or any other suggestions, I'm all ears -- Thanks for any help anyone can provide, Conan Kelly |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim,
Thank you for your help. After some thinking (before anyone replied) I came up with something similar in its own sub procedure. (0:01:09 to save to the old server, 0:00:08 - 0:00:09 to save to the new server) Thanks again for the feedback. Conan "Jim Jackson" wrote in message ... In your sub routine you could use: Activecell = Now() ThisWorkBook.Save Activecell.Offset(1,0) = Now() -- Best wishes, Jim "Conan Kelly" wrote: Hello all, What is the first event that occurs immediately after a workbook is done saving? There is a Before_Save event, but there is no After_Save event. I have a file that takes a while to save to the server. I wanted to time how long it takes to save. I thought about putting "Activecell = Now()" in the Before_Save event, then activate the cell below it. Then when it is done saving, put "Activecell = Now()" in the appropriate event procedure, but I don't know what that is. If anyone has a better way of doing this or any other suggestions, I'm all ears -- Thanks for any help anyone can provide, Conan Kelly |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm glad you got it worked out. I realized when I saw FSt1's reply that I
left out the cell formatting to show the seconds. Sometimes, when one tried to answer before anyone else, things get left out. Best wishes, Jim -- Best wishes, Jim "Conan Kelly" wrote: Jim, Thank you for your help. After some thinking (before anyone replied) I came up with something similar in its own sub procedure. (0:01:09 to save to the old server, 0:00:08 - 0:00:09 to save to the new server) Thanks again for the feedback. Conan "Jim Jackson" wrote in message ... In your sub routine you could use: Activecell = Now() ThisWorkBook.Save Activecell.Offset(1,0) = Now() -- Best wishes, Jim "Conan Kelly" wrote: Hello all, What is the first event that occurs immediately after a workbook is done saving? There is a Before_Save event, but there is no After_Save event. I have a file that takes a while to save to the server. I wanted to time how long it takes to save. I thought about putting "Activecell = Now()" in the Before_Save event, then activate the cell below it. Then when it is done saving, put "Activecell = Now()" in the appropriate event procedure, but I don't know what that is. If anyone has a better way of doing this or any other suggestions, I'm all ears -- Thanks for any help anyone can provide, Conan Kelly |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use BeforeSave
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim nTime As Double Application.EnableEvents = False Cancel = True nTime = Now ThisWorkbook.Save MsgBox Now - nTime Application.EnableEvents = True End Sub -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Conan Kelly" <CTBarbarin at msn dot com wrote in message ... Hello all, What is the first event that occurs immediately after a workbook is done saving? There is a Before_Save event, but there is no After_Save event. I have a file that takes a while to save to the server. I wanted to time how long it takes to save. I thought about putting "Activecell = Now()" in the Before_Save event, then activate the cell below it. Then when it is done saving, put "Activecell = Now()" in the appropriate event procedure, but I don't know what that is. If anyone has a better way of doing this or any other suggestions, I'm all ears -- Thanks for any help anyone can provide, Conan Kelly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
problem :Onclick event occurs after a Setfocus | Excel Programming | |||
Change event occurs | Excel Programming | |||
Deleting cell borders before file opening error occurs? | Excel Programming | |||
Excel Interop Catch Event for Saving a file as xls and as xml? | Excel Programming | |||
event which occurs when a TextBox receives focus | Excel Programming |