VBA - Copy Sheet from One Workbook to Another

Sometimes we need to insert a Sheet from one Workbook into another one. The solution is really easy. Follow bellow code:




That was really simple. Just a few comments:

Always make sure to define the workbooks that are going to be used (Source & Target). This will make the code more legible and it will make things easy to understand in the future. You should apply this rule everywhere in your coding experience. Variables are not only valuable when you have no other choice, they can be used to make your code clearer.

That being said, note in the code how we are inserting the copied Sheet after the last Sheet in the Workbook Target.


That's all folks... Cheers!

Comments

Popular posts from this blog

VBA - Using JSON in VBA

VBA - Change IF Statements for Reference Table