VBA/Macro Course - 3 Ways to Create New Workbooks & Save and Close Them Using a Macro

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • View the Full VBA/Macro Course: www.teachexcel...
    Downloadable File: Available in the full course.
    How to create new workbooks using VBA and Macros in Excel and then the proper way to reference those new workbooks so you can do something with them, including saving them to a new file and closing them.
    (New Non-VBA tutorials are coming soon, I promise!)
    This tutorial specifically covers:
    - How to export a worksheet into a new workbook using VBA.
    - How to move a worksheet into its own workbook using VBA.
    - How to create a new blank workbook using VBA.
    - How to save new workbooks using VBA.
    - How to close new workbooks using VBA.
    - How to properly reference new workbooks using VBA.
    This is a smaller version of the tutorial for my VBA course on TeachExcel.com and I hope you find it helpful :)
    Excel Courses:
    - VBA/Macro Course: www.teachexcel...
    - Building Professional Forms: www.teachexcel...
    TeachExcel.com
    #msexcel #vba #tutorial

КОМЕНТАРІ • 21

  • @MrDavehall19
    @MrDavehall19 2 роки тому +4

    This is so useful thank you, Is it possible to only copy certain rows or even cells from a row into the new workbook?

  • @mirrorofadmiration2912
    @mirrorofadmiration2912 7 днів тому

    What is the use of 51?

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

    The Power Of A Few Lines Of VBA Code!!Cool Tutorial...Thank You Sir :)

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

      You're very welcome Darryl! I am really loving showing how simple things can be with VBA, though, of course, it gets complex fast, but things like creating workbooks is easier than many think. :)

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

    How would i copy multiple sheets to a new workbook? what would I adjust the Worksheets("sales1").copy code to?

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

    Nice tips. VBA is so useful and fun. Thanks for sharing :)) Thumbs up!!

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

      Thanks Wayne! Couldn't agree more! Glad you think so :)

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

    Hello thanks for the tutorial but just want to ask, what is the code for this scenario. I want to create a new workbook with the active sheet?. I have sheets from January - december if I want to create a new workbook for The active sheet February?

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

      Okay got it. It should be
      Activesheet.Copy

  • @amargurjar750
    @amargurjar750 2 роки тому +1

    This is really helpful. You made my day

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

      I'm really glad to hear it :)

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

    Really nice. You have explained so clearly

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

    This is great, thank you. How would I adjust the code to copy across more than one worksheet?

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

      Put an Array("Sheet1","Sheet2") into the copy method - I haven't seen this specific code for a while, but that should do the trick. If it doesn't get you all the way there, just ask in our forum and include any code you already have and it will be easier to help :) TeachExcel's Excel Forum: www.teachexcel.com/talk/microsoft-office?src=yt_comment_reply

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

    Such a good video, so clear and nicely explained

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

    This is so useful. Thank you!

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

      Glad you think so! You're very welcome Justin!)

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

    When do u think the course will be available ?

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

      Well I don't want to give a firm date, but I do believe that I now have everything that remains to be done planned out, with the exception of the specifics of the practical tutorials. The core 100 tutorials are finished and uploaded though and I included a course status and update in this weeks newsletter, but if you aren't signed up for that, you can just click the link to the Blog on teachexcel.com and the latest post talks about it.

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

    Hi could you please help on how to move sheet 1 and sheet 2 simultaneously to another workbook since as you mentioned that array is not working. Thanks for this wonderful video❤