Hello, all. You'll have to excuse me as I'm new to the forum but see there's a world of helpful people and information here so I'd like to take this opportunity to ask for your help.
First - I don't program but I'm very interested in getting into VBA with all the work I have that it can help me with. But here's my issue:
I have a workbook with project plan task list items
Tasks are dependent on the product being installed (products are listed in the task list)
I've created a userform with checkboxes for the products to choose from. You can have one or many products installed.
1. How do I assign the variable to the product name(s) that have been checked so I can use those variables when pulling the specific data over?
2. Once I do that, what is the best way to pull the task list items from the complete task list for only those products selected from the userform?
Right now I have the task list, the userform, and some buttons that simply pull the userform up in once case and another that checks for a worksheet called "Project Plan" and creates it if it's not there or flags a message box if it already exists. It's neat little stuff but it's far from what I need right now.
Any assistance would be highly appreciated. Thank you very much in advance and I'll try not to ask too many follow-up questions!!!
Regards,
SStar
G'Day sstar,
If you could send me an example spreadsheet i can have a quick look if you like.
BUT basically to assign variables in VBA to a check box value it looks a bit like:
As you can see this would be a real hassle if you have ALOT of check boxes / products as you would require an IF statement for each product / check box. Have you considered using a combobox instead for your products? The code would then be much shorter like:Dim MyProduct As ? (either variant, string, boolean, integer, long, etc) If myFormName.CheckBoxName.Value = True Then MyProduct = "whatever product" End If
Dim MyProduct As String (or whatever data type your after)
MyProduct = myFormName.mycomboboxname.Value
Let me know if this helps,
Chris K.
Last edited by davesexcel; 03-15-2011 at 07:26 PM. Reason: code tags required please read the forum rules
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks