View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Neil[_28_] Neil[_28_] is offline
external usenet poster
 
Posts: 4
Default Combo Box programming

Hi
Ive added the following code which seems to work OK But!
When I try to copy and paste cells now the copied cells deselect when I
select the cell to paste them into.
Is there a default function that will run the normal code for cells so that
cut and past can continue normally?


Private Sub Combobox1_Click()
ActiveCell.Value = ComboBox1.Value

End Sub

Private Sub ComboBox1_GotFocus()
ActiveCell.Value = ComboBox1.Value
End Sub

Private Sub Worksheet_Activate()

End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column = 3 And ActiveCell.Row 3 Then
ComboBox1.Visible = True
ComboBox1.ListFillRange = "labour.xla!Db"
Else
ComboBox1.Visible = False
End If

End Sub

"Neil" wrote in message
...
Hi
I have a Combo Box which is populated from another excel file, that works
fine.
What code do I need for;
1) The Combo Box to be visible only when the active cell is in a range ie:
"C4:C100"?
2) Make the linked cell the active cell?

Thanks in advance to anyone who can help.

Neil