PDA

View Full Version : DROP DOWN LIST IS LIMITED



Greg
04-07-2008, 09:22 PM
Hi all,

I have just added a "Registry" dropdown list to one of my documents (see attached) but for reasons that are unclear to me the list will display only 3 of the 9 choices.

I've had a good look at it but I can't see the problem. Would any of you care to comment?

Any assistance will be appreciated.

Greg.

lucas
04-08-2008, 06:42 AM
This fixes it Greg...the registryname was operating from the count of the feeearnername array.
Public Sub UserForm_Initialize()
Dim j As Long
Dim i As Long
FeeEarnerName = Array("CLAIMANT", "BAILIFF", "OTHER")
RegistryName = Array("PERTH", "FREMANTLE", "MIDLAND", "JOONDALUP", _
"SOUTH HEDLAND", "ARMADALE", "KARRATHA", "BROOME", "KALGOORLIE")
For j = 0 To UBound(FeeEarnerName)
cboFeeEarnerName.AddItem FeeEarnerName(j)
Next
For i = 0 To UBound(RegistryName)
cboRegistryName.AddItem RegistryName(i)
Next
cboFeeEarnerName.ListIndex = 0
cboRegistryName.ListIndex = 0
Call MatchCurrentBookmarks
End Sub

perhol
04-08-2008, 06:44 AM
Cant really say that I know what I'm doing in VBA, but have been playing around with your file, and I think i've got the the answer!

I changed your variables. See attachment

Greg
04-08-2008, 08:48 PM
Hi Lucas and thank you for your help. The amended document (attached) works beautifully.

My next task is to add individual addresses to each "Registry". I'm not sure how to do that with a dropdown list and would be greatful if you were to provide me with a clue as to the most economical code to use.

Regards,

Greg.

fumei
04-09-2008, 10:17 AM
Hi Greg.

"My next task is to add individual addresses to each "Registry"."

What does this mean? Add to where? Each "Registry" is a string. Do you mean append a string (individual addresses) to the string already in the array?

As in:

"PERTH" becomes "146 Yadda Street, PERTH"

What - exactly - are you wanting to do?

Greg
04-09-2008, 11:39 PM
Hi Gerry,

You guessed correctly. Perth Registry has its own address (as do the other Registries). I wish to change the address details each time a different Registry is chosen.

Regards,

Greg.

fumei
04-10-2008, 12:27 PM
"I wish to change the address details each time "

Change them......where?

I will ask again.

"What does this mean? Add to where? Each "Registry" is a string. Do you mean append a string (individual addresses) to the string already in the array?"

You answered: "You guessed correctly."

I do not want to guess at anything. I still do not know what you want. I am still guessing. let me see if I can be clearer, and repeat myself.

Do you mean append a string (individual addresses) to the string already in the array?

In other words, CHANGE to actual items in the combobox?

Greg
04-11-2008, 05:08 PM
Yes Gerry, if practicable, I do wish to append individual addresses to the strings already in the array.

However, the font size of those addresses will need to be smaller than the existing text of the registry names.

Indeed, I have already split the cell in the document so that the registry names can appear in one cell and the addresses can be the subject of a different bookmark in a separate cell.

So, if a separate bookmark is to be used, it may not be possible to simply append the addresses to the existing strings.

Please suggest the simplest solution.

Greg.