View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robert Bruce[_2_] Robert Bruce[_2_] is offline
external usenet poster
 
Posts: 108
Default USE OF DROPDOWN in Combobox-a problem

Roedd <<davidm wedi ysgrifennu:

Hi all,

The following code uses the DROPDOWN feature to readily display 25
items of the list.

Private Sub UserForm_Initialize()
With ComboBox1
RowSource = "a1:f100"
ColumnCount =6
listrows=25
DropDown
End With
End Sub

It works fine except that the list comes detached from the Userform.
Can someone supply a cure such that the list will be properly aligned
on the Userform?


I suspect that calling the dropdown method before the form is properly
initialised is causing the problem. Try moving the Dropdown method to the
Activate event (the rest of the code can stay where it is).

--
Rob