+ Reply to Thread
Results 1 to 11 of 11

Before Save Issue

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Before Save Issue

    I am trying to create a beforesave code within my template. The template has certain fields that are blank and when the end user enters data, I want them to be able to click on save or the blue disk and it saves it to a new location, based on their user and some of the cells within the form. I do not want the template to be saved with the data they input. The data they input is saved only when they click the blue disk and it saves to another location, with their username and certain cells in the form. Then the end user can continue using that same template for the next entry and so on. I have a beforeclose that asks them if they really want to close or not. The only time they would close, or hit the big red X is when they are done with all their entries for the day. Here is my code for my beforesave:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Before Save Issue

    Set the file as read only so that users can use SaveAs which will not affect the original template


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Before Save Issue

    How do I do that.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Before Save Issue

    Just go to that file location and select the file>>Do right click on the file>>Properties>>Geneeral>>Attributes>>Give Tick in Read Only Check box and give ok....

  5. #5
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Before Save Issue

    I did that and tested my code and it does not work. I get a run time error. I need the end users which there are 15 to be able to saveas the file by the patient claim which is in B9, name which is in cell B7 and then date the patient was seen that is in cell B10. The nurses are not technical at all and we have tried the whole just go to top after you fill in template and do a whole saveas and they are all frustrated and do not want to do it that way. So, this is why I was asked to code something so all they have to do is fill in the form, when done click the blue disk and it automatically does the saveas in the background and puts it in the folder specified in my code above on their machine. Then the head nurse will grab all those files from the machine and email them to the database admin to upload into the database.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Before Save Issue

    Try this....

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Before Save Issue

    It does not like that either. Says run-time error 1004:method saveas of object workbook failed

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Before Save Issue

    Not sure what is going on at your end in which line the error occurs and all

  9. #9
    Registered User
    Join Date
    02-09-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Before Save Issue

    Hi tmill29,

    It is happening because you do not have values on cell B9 and B7 and B10. please populate these cells with some values and try running the code. It should work.

  10. #10
    Registered User
    Join Date
    01-16-2014
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Before Save Issue

    The cells are populated in the template. The nurse saveas by hitting blue disk. The macro runs and saves to another file, the template then is cleared to prepare for next series of entries. I did get my answer. Thanks and I posted the solution, comment out because doing other coding and don't want to save as everytime right now. Hopefully this will help someone else in the future.

    Please Login or Register  to view this content.

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,944

    Re: Before Save Issue

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Replies: 1
    Last Post: 08-29-2013, 07:29 AM
  2. Save Issue
    By GreenHornet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2006, 12:20 PM
  3. Save As Issue
    By ELAUTO_TECH in forum Excel General
    Replies: 0
    Last Post: 09-29-2006, 06:02 PM
  4. save as issue
    By eyesonly1965 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2006, 03:39 AM
  5. Excel Save Issue
    By AlbertGe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2005, 11:05 AM

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