Excel VBA to Save Data to Another Workbook

Поділитися
Вставка

КОМЕНТАРІ • 35

  • @timparke3305
    @timparke3305 3 роки тому +4

    Exactly what I was looking for... Thank You!!!!

  • @wishboneattack
    @wishboneattack 3 роки тому +9

    If you want to be sure it saved instead of just a msgbox that is basically telling you the macro has ended, you can add an IF statement using the two lines he already gave you to do a simple verification check. Put this right above wbMaster.Close True
    IF wbMaster.Worksheets("Data".Cells(masterNextRow, 1).Value = wbLocal.Worksheets("Input").Range("F3"). Value And wbMaster.Worksheets("Data").Cells(masterNextRow, 2).Value = wbLocal.Worksheets("Input").Range("F5).Value Then
    MsgBox "Part Saved"
    Else
    MsgBox "Part not saved correctly"
    End IF

  • @TeachExcel
    @TeachExcel  2 роки тому

    VBA/Macros Course (40% Discount): www.teachexcel.com/vba-course-update.php?src=youtube_pinned_comment_hgyMrkVWw-o
    200+ Video Tutorials - 200+ Downloadable Excel Reference Files - 50+ Hours of Content

  • @darrylmorgan
    @darrylmorgan 3 роки тому +1

    Really Nice Simple Bit Of VBA Code Thumbs Up...Thank You Sir :)

  • @shaiquenasir
    @shaiquenasir 2 роки тому

    Very useful for me. Thanks
    I have macro based excel sheet but how to share for multiple user entry. Please suggest.

  • @abhishekshrivastava3893
    @abhishekshrivastava3893 Рік тому

    Thanks a lot for this!!!

  • @tomgebka9943
    @tomgebka9943 Рік тому +3

    Great video - the one piece that I am looking for is how to assign a path name for a file on Onedrive that I want to update, not a local workbook. Is there more to it than just the correct path name? When I look at the file path for the Onedrive it shows me a link.
    Thanks in advance

  • @shriharibhat6655
    @shriharibhat6655 26 днів тому

    Thank You for the informative video.
    I would just like to know how we can transfer range of values. I tried inserting the range in the inverted commas, but it is taking only value of the 1'st mentioned cell. If anyone could please help me with it would be great help.
    Thanks Anyways :)

  • @wayneedmondson1065
    @wayneedmondson1065 3 роки тому +3

    Fun one! I hacked out my own solution before watching the video. Picked up some good tips from your detailed lesson. Thanks for sharing. Thumbs up!!

  • @murattulek5783
    @murattulek5783 2 роки тому

    AB AN ERROR: thank you so much for your share and contribution us. i want to ask a question: normally this code run well but when i open another workbook i receive "RUN TIME ERROR NO 9", how can i fix this? (when i close the other workbook code starts well again) thanks a lot in advance!

  • @hirunimarasinghe5728
    @hirunimarasinghe5728 2 роки тому

    Thank you for sharing. But I found an error in the line of masterNextRow- subscript error.

  • @ryanallen8887
    @ryanallen8887 Рік тому +1

    How can I run this same code, but with the feature of keeping the vbMaster open while using the input source? I would like to see the data entry happen side by side and not have the master file automatically close each time an input is "saved". Thanks!

  • @MohAboAbdo
    @MohAboAbdo 2 роки тому

    Thank you so mutch

  • @Couchsleep3r
    @Couchsleep3r Рік тому

    I need to do this but copy a full table over what changes do I need

  • @AzharyRahim
    @AzharyRahim 8 місяців тому

    thank you, with little adjustment i'm able to finish my work

  • @suzannejoshua9836
    @suzannejoshua9836 2 роки тому +2

    Hi, may I know how I can save the data without opening the excel workbook using only the vba excel form.

  • @maheshkhursale8244
    @maheshkhursale8244 3 роки тому

    Thanks. It's very useful. But can we have multiple copy of the input worksheet at clients side and data can be inputed at a time from multiple worksheets?

    • @TeachExcel
      @TeachExcel  2 роки тому

      Sure, you can have all sorts of setups like this! VBA allows you to do a lot - if you're interested in learning how to do a lot more than I showed in this tutorial, you can look at my new VBA Course: www.teachexcel.com/vba-course-update.php?src=yt_comment_reply

  • @vinothsathiyavan8328
    @vinothsathiyavan8328 2 роки тому

    Hiii.. if my closed workbook stored in online how to mention the file path?

  • @allmight4732
    @allmight4732 Рік тому +1

    I encountered error on masterNextRow it says subscript error

  • @ramgshan
    @ramgshan 10 місяців тому

    I have application outside procedure error in each line

  • @thebetalearner9500
    @thebetalearner9500 2 роки тому

    Is there a way to keep the values entered in the form instead of them disappearing when you hit save?

    • @PavalonTech
      @PavalonTech 2 роки тому

      Hmm at about 11 minutes in, he added two lines of code that is responsible for clearing those entries... you could leave those two lines out, and it won't disappear.

  • @curtismorris7482
    @curtismorris7482 2 роки тому

    Why won’t my workbook file location work?

  • @travisbenge1912
    @travisbenge1912 2 роки тому

    alright, what if I don't want to make duplicate entries but update an existing entry with additional/different information

    • @TeachExcel
      @TeachExcel  2 роки тому

      Hi Travis, that is totally possible and I cover pieces of this puzzle in many of the tutorials I've made here on UA-cam (you can search for them on my channel) and also in my full VBA course: www.teachexcel.com/vba-course-update.php?src=yt_comment_reply_hgyMrkVWw-o

  • @offroadies6
    @offroadies6 3 роки тому

    Sir what if I rename master workbook or chane location?

    • @TeachExcel
      @TeachExcel  3 роки тому

      Shouldn't matter if its the Master workbook with the code in it.

  • @safetyjrtmsafetygate1805
    @safetyjrtmsafetygate1805 2 роки тому

    i'm using ur command in VBA but its so weird that whatever I entered it will overwrite the 1st entry and always become a new entry. able to resolve? Thanks

    • @TeachExcel
      @TeachExcel  2 роки тому

      Well it depends on a lot. I'd go over to our forum on www.teachexcel.com and upload the sample files you are working with and ask there - its much easier when the code and issue you are specifically mentioning is visible.

  • @moesadr3342
    @moesadr3342 3 роки тому

    Is there a way that one can globally print all the codes ( Modules, Macros,....) in a an Excel file ( Workbook) to review, cross over,.... to be able to alter some without creating a catastrophe?

  • @qamruddinmohammedi7665
    @qamruddinmohammedi7665 3 роки тому

    Dear Sir,
    want to transfer data from one workbook to another workbook
    workbook -A
    1. Receipt No.
    2. Date
    3. Name
    4. Amount
    to Workbook - B in two different Sheets.
    can you please help me write correct VBA code.

  • @gagayjhem
    @gagayjhem 3 роки тому

    How to save Data to another tab none vba pls

    • @TeachExcel
      @TeachExcel  3 роки тому

      Well, probably copy/paste is the simplest way or copy/paste special values (Ctrl + C > Alt + E + S + V Enter) Otherwise, I'm not sure exactly what you mean by saving the data - if you can upload a sample file, you should ask in my forum and it will be much easier to help you. www.teachexcel.com/talk/microsoft-office?src=yt_comment