![]() ![]() If it hasn’t been saved, then you can use the name without the file extension. ![]() Note that you need to use the file name along with the extension if the file has been saved. If you have two workbooks open, and you want to activate the workbook with the name – Examples.xlsx, you can use the below code: Sub ActivateWorkbook() If you have the exact name of the workbook that you want to refer to, you can use the name in the code. In this section, I will cover the different ways to refer to a workbook along with some example codes. The method you choose would depend on what you want to get done. ![]() There are different ways to refer to a Workbook object in VBA.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |