+ Reply to Thread
Results 1 to 4 of 4

Getting Info From Drop Down Menu

  1. #1
    Paul S
    Guest

    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. #2
    News
    Guest

    Re: 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" <[email protected]> 级糶秎ン穝籇:[email protected]...
    >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. #3
    Paul S
    Guest

    Re: 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" <[email protected]> 录露录g漏贸露l楼贸路s禄D:[email protected]...
    > >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. #4
    News
    Guest

    Re: 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" <[email protected]> 级糶秎ン穝籇:[email protected]...
    > 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" <[email protected]> ???gco?los?D:[email protected]...
    >>
    >> >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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1