I am writing a macro that will copy and paste information form one workbook into another workbook in excel 2010. The workbook that the data is in is the same workbook as the macro. I have made VBA create a new workbook to paste the data in. How do I assign the new workbook that VBA has just created to a variable.
Thanks For Any Help
You haven’t mentioned exactly how you create the workbook, but you can set a reference to the new
Workbookobject in the same statement that creates it.Example: