Thread: Offset problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patrick Simonds Patrick Simonds is offline
external usenet poster
 
Posts: 258
Default Offset problem

As you can tell I use the code to place the contents of a Listbox into the
active cell and a cell 27 cells to the right. If I select a range of cells
(say A1 - E1) the ListBox content is placed in all selected cells but only
once in the cell 27 to the right of the first cell selected. I want a value
placed in the 27th cell from each of the selected cells.



Private Sub OK_Click()

ThisWorkbook.Activate

On Error GoTo Sub1

Selection = ListBox1.List(ListBox1.ListIndex, 0)
ActiveCell(1, 27).Value = ListBox1.List(ListBox1.ListIndex, 4)
ListBox1.ListIndex = 0

Sub1:

Unload EmployeeList

End Sub