View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Lluis Escude Lluis Escude is offline
external usenet poster
 
Posts: 6
Default From cell/combo to combo/cell

This is what I've done so far.

I have placed this in a module:
Global oldtarget As Range

Then , in ThisWorkbook:
Private Sub Workbook_Open()
'StartCell is a named cell where I want to start entering data
Set oldtarget = Range(ThisWorkbook.Names("StartCell"))
End Sub

In Sheet1:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i As Integer
'If the MyCell has just lost the focus, activate the combo
If oldtarget.Address= Range(ThisWorkbook.Names("MyCell")).Address Then
ComboBox1.Activate
Set oldtarget = Target
End Sub

It works fine, but I still have to solve the second part, select a specific
cell after an item from the combo has been selected.