LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default After SaveAs events - are there any?

Hi Orlando

You have solved my problem, and, when I read your reply, I
realised exactly what it was and that I should have found it by
myself. I had somehow reached a blank - just kept looking
everywhere except the obvious.

Thanks very much.

regards
--
Les Hay, Livingston. Scotland
"Orlando Magalhães Filho" wrote in message
...
Hi Les,

Try this:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,

Cancel As
Boolean)
Dim vFilename
If SaveAsUI Then
Cancel = False
vFilename = Application.GetSaveAsFilename("*.xls", "Excel
files(*.XLS),*.xls")
If vFilename = False Then Exit Sub
'At this time you have the file name to do what you want.before

save as
Application.EnableEvents = False
ThisWorkbook.SaveAs vFilename
Application.EnableEvents = True
End If
End Sub


HTH

---
Orlando Magalhães Filho

(So that you get best and rapid solution and all may benefit

from the
discussion, please reply within the newsgroup, not in email)



"Les" escreveu na

mensagem
...
Hi

The very last thing I need for my project (that is until I

find
other needs:-)

I have set up a means of keeping backups based on various
criteria - all this works well.

However, I now need to find the current ActiveBook.FullName on
exit from the SaveAs dialog as the name has changed to match

the
Saved As filename. I can't seem to find any event that fires

after
the SaveAs. I can't use the BeforeSave as the name hasn't

changed
at that time, and obviously I can't call any sub from within

the
BeforeSave sub as the Save hasn't happened yet.

Any ideas or solutions?

regards,
--
Les Hay, Livingston. Scotland






 
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
Using SaveAs SarahN Excel Discussion (Misc queries) 3 May 14th 10 04:26 AM
SaveAs - VBA Jae[_3_] Excel Discussion (Misc queries) 4 April 10th 08 08:10 PM
SaveAs - VBA Jae Excel Discussion (Misc queries) 0 April 10th 08 06:04 AM
VBA SaveAs Value charlie Excel Discussion (Misc queries) 4 August 27th 07 11:33 PM
SaveAs Stan Halls Excel Worksheet Functions 5 November 28th 06 07:51 PM


All times are GMT +1. The time now is 08:20 PM.

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"