Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default the first event that occurs after a file is done saving?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default the first event that occurs after a file is done saving?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default the first event that occurs after a file is done saving?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default the first event that occurs after a file is done saving?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default the first event that occurs after a file is done saving?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default the first event that occurs after a file is done saving?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem :Onclick event occurs after a Setfocus MarMo Excel Programming 3 October 25th 06 08:48 AM
Change event occurs Otto Moehrbach Excel Programming 2 December 2nd 05 04:53 PM
Deleting cell borders before file opening error occurs? timlow Excel Programming 4 July 8th 05 10:13 PM
Excel Interop Catch Event for Saving a file as xls and as xml? m.ahrens Excel Programming 8 December 29th 04 02:11 PM
event which occurs when a TextBox receives focus Mikhail Excel Programming 2 October 7th 03 02:27 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"