Option
Explicit
Private
Declare
Function
SetCursorPos
Lib
"user32"
(
ByVal
x
As
Long
,
ByVal
y
As
Long
)
As
Long
Private
Sub
CommandButton1_Click()
Unload UserForm1
End
Sub
Private
Sub
ListBox1_Click()
Debug.Print
"Click"
End
Sub
Private
Sub
UserForm_Initialize()
Dim
c
As
Range, x
As
Long
SetCursorPos 0, 0
Set
c = Range(Cells(60, 1), Cells(60, 1).
End
(xlDown))
For
x = 1
To
c.Cells.Count
ListBox1.AddItem c.Cells(x).Value
Next
x
ListBox1.Enabled =
True
End
Sub