+ Reply to Thread
Results 1 to 7 of 7

How to execute macro requiring an entry on the "save as" menu

  1. #1
    Registered User
    Join Date
    10-04-2008
    Location
    Laval, Qc CANADA
    Posts
    34

    How to execute macro requiring an entry on the "save as" menu

    Hi there,

    Here is what I need to do; I have a macro that formats the presentation of a sheet, saves a PDF, then restores the original formating.

    However, the user need to be able to use the "save as" menu in order to select new save location and the default title is contained in a cell. Once the user pressed ok, macro must resume to proceed with format and update screen.

    So, is it possible to program the appearance of the "save as" menu with the content of a cell as a file name, then ensure the macro goes on when the user presses ok in this menu?

    Thanx.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to execute macro requiring an entry on the "save as" menu

    You don't need the Dialog you can hard code the save

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    10-04-2008
    Location
    Laval, Qc CANADA
    Posts
    34

    Re: How to execute macro requiring an entry on the "save as" menu

    It answers only part of what I needed; the user still needs to be able to specify the save path.

    However, you did tell me how to use the content of a cell for the filename; it works great! So, anyone about activating the save as menu?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to execute macro requiring an entry on the "save as" menu

    Hello anmck,

    You can invoke the system SaveAs user interface like this...
    Please Login or Register  to view this content.

    The default file name will be the contents of Range("A1"). The result will be true if the user saved the file and false if Cancel was chosen.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    10-04-2008
    Location
    Laval, Qc CANADA
    Posts
    34

    Re: How to execute macro requiring an entry on the "save as" menu

    If I do invoque the interface with

    Please Login or Register  to view this content.
    I do have 2 questions:

    - How can I make the file type PDF as default?
    - Can I compose the .show argument with two cells? For instance, I could used the hard coding tip given by RoyUK like this:

    Please Login or Register  to view this content.
    can I do something similar? I tried, and could not get it done...

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to execute macro requiring an entry on the "save as" menu

    Hello anmck,

    You can show the default file name like this. Also, I have changed the the file extension to PDF.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-04-2008
    Location
    Laval, Qc CANADA
    Posts
    34

    Re: How to execute macro requiring an entry on the "save as" menu

    While it seemed promising, this doesn't do it.

    Please Login or Register  to view this content.
    Does nothing unless I use only values like this:

    Please Login or Register  to view this content.
    Then, the file name appears correctly (but I still would like to add a point to separate!). And then again, I am stuck with being unable to make the PDF file type as default.

    I guess the right answer lies in between all of this, but still could not figure it out! Anyone?

+ 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