Thank you for taking a look at this thread. Here's what I want to achieve.
- The vba is stored in my personal A.xls.
- Run macro "setWS".
- The macro will launch open file dialogbox, let me select another xls file.
- It will check the opened file and look for worksheet with name ending in "-New" regardless of upper/lowercase, e.g. A-NEW, B1-NeW, CC-New.
- Other worksheets without the -NEW will be ignored.
- If there's only 1 worksheet ends with -new, then just set variable wsn to that worksheet name.
- If more than 1 worksheets with -new are found, then open the userform with a listbox and a select button.
- Populate the worksheet name in the listbox.
- I can either double click and select one of the worksheet name in the listbox, or single click on a worksheet, then click Select button. Both actions will do the same thing, setting the selected -New worksheet name to variable wsn.
- Once wsn is set, close the userform, and continue with next part of the code.
- I try to piece together the code, but this is as far as I go.
Please Login or Register to view this content.
Bookmarks