View Single Post
 
Old 08-08-2014, 04:06 PM
whatsup whatsup is offline Windows 7 64bit Office 2010 32bit
Competent Performer
 
Join Date: May 2014
Posts: 137
whatsup will become famous soon enough
Default

Now, a few hours later I'm afraid you will have to rebuild your file. Somehow the ListBoxes don't allow to use their .value property, what isn't a good sign at all

The main problems are:
- Missing of declaration of variables and thereof leaving too much to vba interpreting what you want
- Names used by excel are used as well for variables
On top try to:
- avoid too many jumpmarks within the code
- avoid Using ":" - instead use a new line in the code
- be as especifically as you can, to determine the type of value the variable shall have thus using the correct type in decalaration.
- do declare all variables, using "Option Explicit" on top of each module will help to discover undeclared variables.
- use With-blocs to help easy reading of code (on top it will speed up codes)

In the attachment you will find an example how it works filling and obtaining the values of the ListBoxes. I changed:
- Uf_CertPlanSubCat (for showing the next UserForm)
- Uf_CertPlan_Owner (the Initialize-event calls now for "ReloadCertPlanOwner")
- Sub ReloadCertPlanOwner() (in addition the Function Get_Index())
- Uf_CertPlan_Owner the Private Sub Cb_Back_Click()
Attached Files
File Type: xlsm PBM Help_v4_mod.xlsm (80.7 KB, 14 views)
Reply With Quote