View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim[_70_] Jim[_70_] is offline
external usenet poster
 
Posts: 5
Default Help with SetFocus required please

I have a combobox in a userform and wish to prevent the leaving the value
blank.
I have used the following code

If ComboBox1.listIndex = -1 Then
Msgbox "Please select a value"
Combobox1.SetFocus
End If

It doesn't work - the focus moves to the next control

Why is this ?