Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Getting Info From Drop Down Menu

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Getting Info From Drop Down Menu

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Getting Info From Drop Down Menu

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
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






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
Drop Down Menu AutoPopulate Contact Info? Clay H Excel Worksheet Functions 2 April 28th 10 02:48 AM
Drop dwn menu. Formula to count selection frm menu in anoth cell? ggoldber Excel Worksheet Functions 1 June 4th 08 02:21 PM
Drop Down menu w/ info in other columns Peebs Excel Worksheet Functions 1 January 11th 08 05:32 PM
Pivot tables hide info drop down menu JSM Excel Worksheet Functions 1 September 23rd 06 06:08 PM
link drop down menu to info in worksheet bob New Users to Excel 2 December 14th 04 10:09 PM


All times are GMT +1. The time now is 04:52 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"