-
Open and Close Workbooks | best Practices
Hello,
i am currently working on an VBA Project which opens and closes different Workbooks (and PowerPoints). What are Best Practices concerning this undertaking?
- Do i create a new Application for every WorkBook i open in a loop? -> set xlAPP = CreateObject("Excel.Application") [or CreateObject("PowerPoint.Application") for PowerPoint
- Do i declare a different variable for each Workbook, even the one i'm running the macro from? -> set wb = Workbooks.Open(Name)
- When do I close the application of Excel/Powerpoint? When do i close the opened workbook (here wb)
I did not find anything on the web and wanted to sharpen my understanding of handling those objects!
Thanks for the replies!
Greetings
o0omax
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules