Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Get the Excel Filename after a save

Hello,
I need a way to figure out under what filename someone saved his
spreadsheet.
I basically would need an event like AfterSave (as there is one called
BeforeSave). I know that I could emulate the save behaviour in
BeforeSave and just return cancel, but I would rather not do that,
specially with all the filetypes that some excel versions support and
others dont'.
I also know that with ActiveWorkbook.FullName I can get that name, but
I'm not sure at which point I should do that?
Is there an event that gets called after a save happend or how can I do
this?

Thanks

Remy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Get the Excel Filename after a save

Perhaps, use the BeforeClose event to compare the current filename with a
stored value?

HTH,
Bernie
MS Excel MVP


"Remy" wrote in message
oups.com...
Hello,
I need a way to figure out under what filename someone saved his
spreadsheet.
I basically would need an event like AfterSave (as there is one called
BeforeSave). I know that I could emulate the save behaviour in
BeforeSave and just return cancel, but I would rather not do that,
specially with all the filetypes that some excel versions support and
others dont'.
I also know that with ActiveWorkbook.FullName I can get that name, but
I'm not sure at which point I should do that?
Is there an event that gets called after a save happend or how can I do
this?

Thanks

Remy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get the Excel Filename after a save


You could grab the filename on the "Workbook Deactivate" event. This i
assuming that they saved it..

--
tkstoc

-----------------------------------------------------------------------
tkstock's Profile: http://www.excelforum.com/member.php...fo&userid=1444
View this thread: http://www.excelforum.com/showthread.php?threadid=37963

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Get the Excel Filename after a save

Remy,

I thin you are going to have to take that approach in some form. If the
workbook has already been saved before, you can get the fullname at that
point, if it hasn't, you could throw up a GetSaveAsFilename dialog and get
the name and then save, then cancel.

--
HTH

Bob Phillips

"Remy" wrote in message
oups.com...
Hello,
I need a way to figure out under what filename someone saved his
spreadsheet.
I basically would need an event like AfterSave (as there is one called
BeforeSave). I know that I could emulate the save behaviour in
BeforeSave and just return cancel, but I would rather not do that,
specially with all the filetypes that some excel versions support and
others dont'.
I also know that with ActiveWorkbook.FullName I can get that name, but
I'm not sure at which point I should do that?
Is there an event that gets called after a save happend or how can I do
this?

Thanks

Remy



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Get the Excel Filename after a save

If they don't save the workbook then I also don't need the filename, so
that is ok.
Initially I wanted to have the filename registered the first time they
save it (even if they don't close the spreadsheet), but I guess it's
good enough if I update the filename once they close it.

The reason I don't like the GetSaveAsFilename approach is that this
macro should work for different excel versions, without really limiting
the users, and it gets a big complicated when I also have to figure out
what file types all the Excel versions support.

Thanks a lot for the help guys



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Get the Excel Filename after a save

Try activeworkbook.name

"Remy" wrote:

Hello,
I need a way to figure out under what filename someone saved his
spreadsheet.
I basically would need an event like AfterSave (as there is one called
BeforeSave). I know that I could emulate the save behaviour in
BeforeSave and just return cancel, but I would rather not do that,
specially with all the filetypes that some excel versions support and
others dont'.
I also know that with ActiveWorkbook.FullName I can get that name, but
I'm not sure at which point I should do that?
Is there an event that gets called after a save happend or how can I do
this?

Thanks

Remy


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
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
save as different filename Tom Excel Programming 3 May 4th 05 03:41 AM
How to save a vary filename by Macro in Excel? mc Excel Programming 1 October 15th 04 01:34 PM
Filename has Url in file-save dialog when saving exported Excel do GJones Excel Programming 0 September 1st 04 08:17 PM
Save excel file with filename = cell text TroyB[_2_] Excel Programming 1 November 26th 03 01:00 AM


All times are GMT +1. The time now is 09:53 AM.

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

About Us

"It's about Microsoft Excel"