+ Reply to Thread
Results 1 to 6 of 6

Require a SAVE AS when msgbox answer = yes

  1. #1
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Question Require a SAVE AS when msgbox answer = yes

    I am creating a TEMPLETE workbook.

    When this workbook opens, the first thing I do is ask the user if they are starting a new project.

    Please Login or Register  to view this content.
    How do I require the standard Microsoft "SAVE FILE AS " dialog box, after the user chooses YES ?? ( I want this to be the first thing to occur once the chose yes.


    UPDATE: Let me specify further....and once they do "save file as" but then continue on with my current coding (which is quite long if they do select yes).
    Last edited by clemsoncooz; 02-13-2012 at 04:01 PM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Require a SAVE AS when msgbox answer = yes

    try something like this in THISWORKBOOK module
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: Require a SAVE AS when msgbox answer = yes

    Thanks Tom 1977.

    I noticed you dont have a vbNo part that goes with my varAnswer.

    I do. Does the "Set Wind = Nothing" line go with my vbNo code?

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Require a SAVE AS when msgbox answer = yes

    Hi
    No it only clears the variable "WIND"
    You did not write what You want after choose "no" so I did not put this into code

  5. #5
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: Require a SAVE AS when msgbox answer = yes

    Very cool. I believe this is working just the way I asked (so far).

    Thank you so much!

    Any way to change the default save file type as "Excel-Macro Enabled Workbook" (xlsm) RATHER than the Exel Workbook (xls) type so the user doesnt have to change it? Because I do want them to save it as macro enabled (xlsm).

  6. #6
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Require a SAVE AS when msgbox answer = yes

    Sorry I have checked all methods and properties of this object FileDialog(msoFileDialogSaveAs) but I did not find the one which set this automatically to FileFormat:= xlOpenXMLWorkbookMacroEnabled
    Maybe someone else could find solution

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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