Excel VBA: Opening, Saving and Closing Workbooks with VBA

Поделиться
HTML-код
  • Опубликовано: 6 окт 2019
  • In this video, we look at how to use workbooks in Excel VBA.
    We focus on opening, saving and closing workbooks and different techniques to do so. With their pros and cons.
    Enrol in the full Excel VBA for beginners course - bit.ly/2JvnnRv
    The scenario in the video is to copy and paste a range of cells from the current workbook to one that is saved on a drive somewhere.
    So we will need to open the other workbook, and then refer back to the previously current workbook to copy a range of values from it.
    Need help with a VBA project? - partners.excelrescue.net/74-3...
    A few different techniques are covered by this scenario. A nice introduction to referencing the current or other workbooks with VBA. And why you would use specific approaches.
    Find more great free tutorials at;
    www.computergaga.com
    ** Online Excel Courses **
    The Ultimate Excel Course - Learn Everything ► bit.ly/UltimateExcel
    Excel VBA for Beginners ► bit.ly/2JvnnRv
    Advanced Excel Tricks ► bit.ly/3CGCm3M
    Excel Formulas Made Easy ► bit.ly/2t3netw
    Creating Sports League Tables and Tournaments in Excel ► bit.ly/2viGg3J
    Connect with us!
    LinkedIn ► / 18737946
    Instagram ► / computergaga1
    Twitter ► / computergaga1
  • ХоббиХобби

Комментарии • 16

  • @user-xl8ry3po1v
    @user-xl8ry3po1v 10 месяцев назад

    I've been pulling my hair out on how to get data from a Macro enable workbook into Smartsheets. I had a different file that I was doing a query in to pull that data but it was going to have to always be open to update from my macro enable workbook. This code just solved everything. Thank you so much.

  • @sasavienne
    @sasavienne 4 года назад

    Great as usual. Thanks Alan. 👍

  • @mauricelee2219
    @mauricelee2219 3 года назад

    Very nice and helps a lot. Thank you very much.

    • @Computergaga
      @Computergaga  3 года назад

      Great to hear. You're welcome, Maurice.

  • @wayneedmondson1065
    @wayneedmondson1065 4 года назад +1

    Hi Alan.. always informative and a pleasure to view your videos. Love the Application.GetOpenFilename method.. use that often. Thanks for sharing your knowledge. For anyone who wants to learn the fundamentals of VBA.. take Alan's course (I did).. it's great and it will quickly get you up and running and automating your workbooks and worksheets. Thumbs up!

  • @darrenteo6793
    @darrenteo6793 3 года назад +1

    Hi Alan, great and awesome video! Is there a way to match both Excel workbook column headers while using the Application.GetOpenFilename method. This to check whether both files column headers matches before pasting data. I want to prevent any user in pasting data to the wrong file.

  • @juliane1mota
    @juliane1mota Год назад

    Computergaga, I have a problem. I need to write a vba code to save a workbook in a specific location. I accomplished this, however, my challenge lies in the fact that many users will be using this file to enter data and get it saved in the specific folder. Ideally, I should use the UNC path rather than mapped paths, or my users who might have it mapped differently will have problems. How do I use UNC path in this vba code?

  • @1112GT
    @1112GT 4 года назад

    Thanks, a great video. One question; in this instance, we defined the contents of the current workbook (A2:C6) to be copied. I feel even that could be coded since the cells to be copied may vary from month to month. Your views please.

    • @Computergaga
      @Computergaga  4 года назад

      Absolutely. I was just keeping that part simple. There are various techniques we can use to find the last row and last column used. This can include the current region property, or the count property.

    • @1112GT
      @1112GT 4 года назад

      Thank you for the immediate response

  • @afzalzamiransari
    @afzalzamiransari 4 года назад

    Sir I want to extract name and email address of vendors from LinkedIn in excel at a time how can I do that.

    • @Computergaga
      @Computergaga  4 года назад

      I've not tried getting data from LinkedIn before.

    • @afzalzamiransari
      @afzalzamiransari 4 года назад

      @@Computergaga sir please. Try it. It is important for me and it would be my great pleasure if you solve it

  • @Molnify
    @Molnify 4 года назад +1

    Hey, great video! Love to watch videos that shows ways on doing stuff in Excel. If you want to, check out my channel where I have tutorials on how to turn your Excel models into web apps - no coding necessary!