+ Reply to Thread
Results 1 to 22 of 22

Creating excel book in folder and saving data to closed files

  1. #1
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Creating excel book in folder and saving data to closed files

    Hello friends

    Can I ask for your help about the attached files?
    I think it is a difficult work to do.I specified the necessary explanations in the document.
    I would be very happy if you can look at it at your convenient times.
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    I'm not sure I completely understand what you are wanting, but maybe this is a start. When you run the macro, it saves the data entry sheet as a new workbook in the same folder that the data entry workbook is in and names it the name that is in column R.
    I assume that the names in column R will always be the same. Here is the code and a sample workbook:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Hello Achammar

    This is an approximate solution.But there is a missing situation.Data will always be entered one after the other on the created pages.Using the home page as a form, the data will always be saved in the relevant book one after the other.
    The desired company will have a book in the folder and its records will be saved one under the other.In short, by using the data entry page in closed excel books, the relevant data will be saved in those kits one after another
    I hope I could explain it with my broken English spelling

  4. #4
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Ok, I see.
    Will the name in column R always be the same in all the rows?
    Will the books you want to put the data in already exist?

  5. #5
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Hi again,

    Ok, this probably isn't exactly what you need but I'm sure it's a lot closer. There's still a lot I don't know.
    There are some requirements for this to work. We can work on changes after you see how this works.
    1. Each of the books must already exist and be in the same folder as the data entry workbook.
    2. This macro will always use the value in R2 to determine which workbook to put the data in.
    3. This macro will put ALL the data in the data entry sheet into the closed workbook.
    4. All the workbooks should only have 1 sheet to make sure the data gets put into the right sheet... (at least for now).

    When you run the macro, it will take ALL the data in the sheet, and put it in the workbook with whatever name is in cell R2, and it will be after the data that is already there.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Tacir,

    Everything in my last post still applies, but this is better and safer.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Hello Achammar,

    It was exactly what I wanted. In addition, can we do that ? If there is no related book in the folder, can the code add it?
    For example Apple workbook ,what is not in the folder.Let the code create this excel book itself
    Other than that, it was exactly what I wanted.

    Best regards

  8. #8
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Hello Tacir,

    I'm glad that is what you needed! And adding the code to create the workbook was easy since it was already done in the first one I sent Here is a new version that will create the workbook if it does not exist.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Hello again,

    Here's another version. It's pretty much the same as the one I just uploaded, but on this one if an error occurs it tells the user that the data may not have been copied to the closed workbook. For example, if there is nothing in cell R2 then it will error. You can change the message to whatever you want by changing what is between the quotes in the 'MsgBox' line at the bottom of the code. So either this one or the previous one should do what you want.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Hello Achammar,

    it was so super.It was a work that could be enriched.bless your hands.good job
    If there is an additional situation later, can I declare

    Best regards

  11. #11
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Achammar,

    I just thought and wanted to say.
    Can the transfer row be fixed to the second line of the related books?
    other lines will be transferred as before
    If there is a transfer line on the home page, it should be copied to the second line of the related book.
    Attached Images Attached Images
    Last edited by Tacir; 03-28-2021 at 08:20 AM.

  12. #12
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Hello Ticar,

    I have a couple questions.
    In the photo, you have all 5 lines added to the related book including the transfer line, and also the transfer line put again in row 2. Do you want the transfer line put into both places like your photo shows?
    And do you want the transfer line that goes in row 2, to replace the one that is already there?

  13. #13
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Hello Achammar

    each time the turnover row will be copied to the second line of the respective books
    others will be copied under the full lines again
    Each record will be copied below the filled rows.only the transfer rows will be copied to the second row.
    If there is a transfer line, it will be copied to the second line of the related books.
    If there is the word transfer, copy it to the second line of the closed books.
    The transfer line will be single so it must be in the second line.

    If this can happen, the program will be perfect.
    Last edited by Tacir; 03-29-2021 at 11:05 AM.

  14. #14
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Tricar,

    Ok, try a few tests with this one. Let me know how it goes!
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Achammar,

    I am transferring the same data several times
    Transfer is located in all lines of the word line.
    It should be in the second line containing the word transfer.
    other lines should be copied following the filled lines.
    Attached Images Attached Images

  16. #16
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Tacir,

    Ok, I think I understand what you want. Try this one:
    Attached Files Attached Files

  17. #17
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Achammar,

    in the first run of the code, the third line was not copied to the corresponding page (sample product1 )
    looks fine on second transfer.


    https://hizliresim.com/C0i3NL
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Tacir; 03-29-2021 at 04:34 PM.

  18. #18
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Ticar,

    It looks like you were using a blank file with just a header in it only. I didn't know you would be doing that. I'm only working on this in my spare time here at work so I don't have much time to test. But I think this one might work for you. Test it out and let me know!
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Hello Achammar,

    I am using the data entry page.Closed excel files are created in this direction.
    Transfer and excel books have been created with your codes.It seems that the process has been completed with this study.
    it's super Thank you very much.
    If something goes wrong, I will also forward it.
    Thank you again

  20. #20
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Ticar,

    Good! Glad to hear that and you're welcome! If this post answered your question, would you please mark it as solved and if you're happy with the help I gave you, you could help me out by adding to my reputation in the 'Add Reputation' link at the bottom of any of my posts. I hope this works out good for you! It was a pleasure!

  21. #21
    Forum Contributor
    Join Date
    09-23-2020
    Location
    Turkey
    MS-Off Ver
    Office Pro Plus 2016 TR
    Posts
    140

    Re: Creating excel book in folder and saving data to closed files

    Achammar,

    I've already added it already An auto control mechanism is required based on this work.
    I want to open it on a separate subject.This work was perfect.
    I stated the statement of reputation as perfect

    Thanks again

  22. #22
    Forum Contributor
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    273

    Re: Creating excel book in folder and saving data to closed files

    Thank you!

+ 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. Excel creating TMP files on Network Shares when saving
    By Imran Magsi in forum Excel General
    Replies: 0
    Last Post: 07-10-2020, 12:09 PM
  2. Macro for Creating one master data files from multiple files in the folder
    By NikhilDixit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2017, 03:10 PM
  3. Replies: 2
    Last Post: 07-25-2017, 02:23 AM
  4. VBA Saving PDF files in the same folder where the excel workbook is saved
    By hyunee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2016, 12:54 AM
  5. Creating Folder and saving files comtaining a phrase
    By garimabansal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2013, 10:59 AM
  6. Combine Data from Closed Files within the same folder
    By lasjbp9 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2013, 10:07 AM
  7. Replies: 1
    Last Post: 02-29-2012, 01:15 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