Greetings, everyone,
I know that vLookup can be tricky to work with at times but I'm flummoxed by this one.
In the attached (cut-down) workbook, selecting "Add New Data" will bring up the user form. The user form has a multi-select listbox which works fine in writing data to the various sheets however, the vLookups (with wildcards) on the "Currency sheet never seem to work right on the full version I have at home (the maximum number of items I can select from the listbox to have the vlookups work consistently is 3).
SO, I started to make a cut-down version to put here on the forum and what did I discover? The vLookups are working exactly as I intended (regardless of whether I select 1, 3, 7, or all of the items in the listbox), go figure.
Now the only difference between the two workbooks is the number of sheets being used; on the full version I have 3 sheets (Front Page, Dropdowns, Currency) and 28 other sheets with staff names - on this cut-down version I have Front Page, Dropdowns, Currency, and 4 sheets with staff names.
I put both workbooks side by side on screen and ran through each line of code , and they're identical. I know that Excel will allow a lot more sheets to be used so I'm pretty certain that it's not the number of sheets that is causing the problem. The only other thing I can think of is maybe the select case code has a problem with it; thing is, I can't see it.
Can anyone shed some light on this one for me?
Cheers,
AJ
PS - since the purpose of the vlookups is to check a member's currency in certain tasks, a sort function on date (from newest to oldest) for each of the 28 named sheets on the full version (4 for this one) is part of both the auto-open procedure and the Check Currency button procedure.
PSS - on the full version at home I also tried using the TRIM function within the lookup, but that didn't work either.
I know that vLookup can be tricky to work with at times but I'm flummoxed by this one.
In the attached (cut-down) workbook, selecting "Add New Data" will bring up the user form. The user form has a multi-select listbox which works fine in writing data to the various sheets however, the vLookups (with wildcards) on the "Currency sheet never seem to work right on the full version I have at home (the maximum number of items I can select from the listbox to have the vlookups work consistently is 3).
SO, I started to make a cut-down version to put here on the forum and what did I discover? The vLookups are working exactly as I intended (regardless of whether I select 1, 3, 7, or all of the items in the listbox), go figure.
Now the only difference between the two workbooks is the number of sheets being used; on the full version I have 3 sheets (Front Page, Dropdowns, Currency) and 28 other sheets with staff names - on this cut-down version I have Front Page, Dropdowns, Currency, and 4 sheets with staff names.
I put both workbooks side by side on screen and ran through each line of code , and they're identical. I know that Excel will allow a lot more sheets to be used so I'm pretty certain that it's not the number of sheets that is causing the problem. The only other thing I can think of is maybe the select case code has a problem with it; thing is, I can't see it.
Can anyone shed some light on this one for me?
Cheers,
AJ
PS - since the purpose of the vlookups is to check a member's currency in certain tasks, a sort function on date (from newest to oldest) for each of the 28 named sheets on the full version (4 for this one) is part of both the auto-open procedure and the Check Currency button procedure.
PSS - on the full version at home I also tried using the TRIM function within the lookup, but that didn't work either.