View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
News[_3_] News[_3_] is offline
external usenet poster
 
Posts: 14
Default Getting Info From Drop Down Menu

From your description you need to the set Cancel=True, to abort Excel's
SaveAs and only excute your own.
The SaveAsUI value tells you whether the _BeforeSave event was called by a
..Save or .SaveAs so you can react accordingly.

NickHK

"Paul S" ...
Hi NickHK,

I was wanting to get the filename without having to access GetSaveAsName.
I
have played a little with it, but notice it pops up a secong Dialog box
after
the SaveAs menu box is opened and a name entered. Is this why you have to
set EnableEvents to false (then restore it on exiting) in the BeforeSave
handler?

Sorry, I'm just a little bit rusty on my VBA. Most of my programming in
recent years has been using C/C++ on mainframes, and I'm now having to
relearn the VB PC environment all over again.
--
Thanks,
Paul S


"News" wrote:

Paul,
Basically you can't. You either set the filename to use and call .SaveAs
yourself, or you let Excel handle it and see what it is after.
What do you have against GetSaveAsFilename ?

NickHK

"Paul S" ...

I was wondering if it is possible for a macro to get information from
the
drop down menus; specifically the File-Save and SaveAs menus. I would
like
to get the name of the file the spreadsheet is being saved as, without
using
Workbook.FullName or GetSaveAsFilename. I have searched in Excel VBA
help,
books and online, but haven't seen anything listed.
--
Thanks,
Paul S