Hello All,
For the first time, I'm using userforms and multiple workbooks. I want to use a userform to list the open workbooks, then capture the choice so I can perform actions on that workbook (like get data from it). I have the list, but I can't store or use the choice correctly! Code snippets are below. So close, yet so far!
The userform seems to store just the name of the workbook, as a string. If I set varSourceBook as a String I can get the name, but it's useless because I can't reference it as a workbook. If I set varSourceBook as a workbook, I can't even assign the variant from the userform to it, and thus can't use it.
(As a bonus question: is this the right structure to be using? I plan to have a workbook that has nothing but the VBA program in it, and the userform will have you choose which open workbook you want it to get the source data from. The program will then create and save a new output workbook.)
Any help would be greatly appreciated!
Thanks,
Alex
Bookmarks