Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Drop Down Menu AutoPopulate Contact Info? | Excel Worksheet Functions | |||
Drop dwn menu. Formula to count selection frm menu in anoth cell? | Excel Worksheet Functions | |||
Drop Down menu w/ info in other columns | Excel Worksheet Functions | |||
Pivot tables hide info drop down menu | Excel Worksheet Functions | |||
link drop down menu to info in worksheet | New Users to Excel |