View Single Post
  #6   Report Post  
Peter Jausovec
 
Posts: n/a
Default

Ok; we assume combobox is hidden :) . But here's another neat enhancement (I
don't know how I haven't rembered it before) - combobox width and height are
set to the cell's width and height:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.column = 11 Then
ActiveSheet.Shapes("Combobox1").Visible = True
ActiveSheet.Shapes("Combobox1").Left = Target.Left
ActiveSheet.Shapes("Combobox1").Top = Target.Top
ActiveSheet.Shapes("Combobox1").Width = Target.Width
ActiveSheet.Shapes("combobox1").Height = Target.Height
Else
ActiveSheet.Shapes("Combobox1").Visible = False
End If
End Sub


--
http://blog.jausovec.net


"MartinShort" wrote:


That's true, but I was assuming it was hidden when the workbook was
initially saved ;)

I did like your TARGET functions though; it's not something I've used
in terms of object co-ords and Excel Help is strangely quiet on the
issue...


--
MartinShort

Software Tester
------------------------------------------------------------------------
MartinShort's Profile: http://www.excelforum.com/member.php...o&userid=22034
View this thread: http://www.excelforum.com/showthread...hreadid=376700