Hello Doctor Dinero,
Here is an example. Due to the lack of details in your post, I can not offer you a specific solution.
This macro will check all open workbooks, except for the workbook the macro is in. Each sheet in every workbook is compared to two possible names: Sales Orders, Purchase Orders. You can change these to match the worksheets you will be checking for.
If a match is made then the Function will return either "Sales" or "Purchases" as the workbook type. Again, you can change this to what you will be using.
Bookmarks