+ Reply to Thread
Results 1 to 11 of 11

save as the file with default yes

  1. #1
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    save as the file with default yes

    Hi,

    after running my macro i wanted to save as the file. while saving as system is giving the attched warning mesg where i have to click on yes. now i wanted to fix that in script where it accepts yes and save as the file.

    activeworkbook.close is closing only the internal window. please let me know how to close complete excel appliction through script.

    regards,
    vimala k

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: save as the file with default yes

    add this to the beginning of your code

    Please Login or Register  to view this content.
    and put this at the end

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: save as the file with default yes

    then how to close the complete excel application?

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: save as the file with default yes

    the Application.Quit should be the very last statement. It should close the XL file and instance, so be careful

  5. #5
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: save as the file with default yes

    hi,

    this is working fine for me.... one last doubt.

    i need to put the month and year as 2014_10 if i am running the macro in October. if i am running the macro in september it should give me 2014_09.

    can you help me on this.

    regards,
    vimala k

  6. #6
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: save as the file with default yes

    not sure where you want this but this should work

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: save as the file with default yes

    column m of my report contains the dates.... where i wanted to chage that column to the format of YYYY_MM.

    it should be (_) and not (-).

    hope this is clear.

    regards,
    vimala

  8. #8
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: save as the file with default yes

    I mis-understood....you just want to change the format in the dates in COL M to YYYY_MM...try this...

    highlight the column and go to format cells...
    go to custom format and type in the "Type:" field YYYY_MM
    click OK

    that should change the way they look

    NOTE: this will only work if the dates are real XL dates...

  9. #9
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: save as the file with default yes

    but i want this in script. the user is not allowed to select and choose the options. so help me out the same in a script.

    regards,
    vimala

  10. #10
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: save as the file with default yes

    sorry, I'm not sure what you are talking about...

  11. #11
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: save as the file with default yes

    direct in sheet i can go to the sheet and select that option what you have given... but i wanted this activity in the script.

    regards,
    vimala

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sharepoint default 'save as' file order
    By outofthehat in forum Excel General
    Replies: 0
    Last Post: 09-17-2013, 11:02 AM
  2. [SOLVED] Save As Dialog Box - Default Path and File Name, User Selects Sub Folder from Default Path
    By christenprochaska in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2012, 05:17 PM
  3. Default Save & Open File Location
    By mike_vr in forum Excel General
    Replies: 0
    Last Post: 09-14-2011, 09:51 AM
  4. save file in unknown default location with string?
    By poopdish in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2007, 09:38 AM
  5. [SOLVED] default save as file type does not work
    By gregf in forum Excel General
    Replies: 5
    Last Post: 02-10-2006, 03:55 PM

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