-
There are a few ways to approach holding that value for the userform. The most straight-forward is to declare a global variable, meaning one that all routines, functions and forms can access.
Declare it at the top of a standard module (like the one I would imagine "FOI" is in)[VBA]Public MyValue as String[/VBA]
Now you will be able to retrieve that value in your UserForm code
You need to be careful with allowing variable to have this degree of "visibility" (known as scope). Just as all your routines can read it, they can also change it, which can cause debugging nightmares, but if it's initialized in one place and just read in another, it's managable.
Technically speaking, you already had it available... you set it as the tooltip text on your control, so you could get it from there. The paramater property of a controlbutton is usually used for this - you could also save it in a cell of an AddIn's hidden worksheet, in the registry, etc, etc - but I think a global variable will do the job for you
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules