+ Reply to Thread
Results 1 to 7 of 7

Saving copy of an open Workbook......

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    SG
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question Saving copy of an open Workbook......

    Hi,

    I'm new with VBA nd like any other rookie, have tons of problems Basically my idea is when someone open default file, insert data, and when he/she try to save file, macros save workbook with inserted data as another file (*.xlsx) with name whose parts are from cells of the workbook and make pdf in another folder. Pdf part is working fine, but with second part just can't find right option. I've tried various code examples but mostly reward was error announcement. Really need help

    Please Login or Register  to view this content.
    Thanks guys for your time
    P.S Sorry if i've made any language mistake
    Last edited by vvujke; 04-28-2012 at 05:00 AM. Reason: code update

  2. #2
    Registered User
    Join Date
    04-27-2012
    Location
    SG
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Saving copy of an open Workbook......

    anyone? really need help

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Saving copy of an open Workbook......

    try this
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  4. #4
    Registered User
    Join Date
    04-27-2012
    Location
    SG
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Saving copy of an open Workbook......

    Hi John, thank you on your replay. I've just noticed that I have accidentally copy/pasted wrong first line of code. My code is :
    Please Login or Register  to view this content.
    and my regular result is Run-time error '1004': method 'SaveAs' object '_Workbook' failed. I've searched the treads and found couple replays that pointed to http://www.rondebruin.nl/saveas.htm but I still can't find a solution. Thanks again for replay

  5. #5
    Registered User
    Join Date
    04-27-2012
    Location
    SG
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Saving copy of an open Workbook......

    Hi John, thank you on your replay. I've just noticed that I have accidentally copy/pasted wrong first line of code. My code is :
    Please Login or Register  to view this content.
    and my regular result is Run-time error '1004': method 'SaveAs' of object '_Workbook' failed. I've searched the treads and found couple replays that pointed to http://www.rondebruin.nl/saveas.htm but I still can't find a solution. Thanks again for replay

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Saving copy of an open Workbook......

    hi,
    I tried yr code and it works very well....see the file attached
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-27-2012
    Location
    SG
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Saving copy of an open Workbook......

    Thanks John a lot, I've managed to see what was the problem, my default value in referring cells was [100] and brackets caused all the problems.hahaha typical rookie stuff.
    When i tried file now i spotted few things that i wood like to improve , maybe you already know exact code

    I would like to avoid:

    "Open as read only.." msg on the start of the initial file,
    leave macros enabled,
    do you want to save changes to initial file when want to close it,
    and in cell F7 i have Today function, which i would like to leave as date only in a copy of workbook.

    Also, when i try to save copy, save as window popout two times, can it be reduced to one?

    Thanks again a lot and have a nice weekend

+ 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