Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox repeat selection fails
Hello
The user wants an easy way to select names. He is unhappy with Data Validation as it is too slow. I added a list box to the Sheet which when clicked will add the selected name to the active cell. However, on testing I've noticed that if he selects Joe Bloggs and then moves to the the next cell and selects Joe for the next column or row then nothing happens. I tried adding EnableEvents = True to no effect. You can select another name successfuly and then pick the name again but it seems a bit stupid to do this. Can anyone help? the code is: Private Sub obNamesListBox_Click() EnableEvents = True Addr = ActiveCell.Address With Sheets("Duty Roster") Set nRng = .Range("Names") End With VRange = Sheets("Week View").Range("InputRange").Address Set isect = Application.Intersect(Range(Addr), Range(VRange)) 'On Error Resume Next If isect Is Nothing Then 'do nothing Else 'Linked Cell ActiveCell = Cells(2, 13) With ActiveCell.Font .Name = "Times New Roman" .Size = 10 End With End If ActiveCell.Activate Range("M2").ClearContents EnableEvents = True End Sub M2 is the linked cell from which the activecell takes its value. Hope someone can help Peter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Listbox selection | Excel Discussion (Misc queries) | |||
Listbox selection | Excel Programming | |||
Don't want to repeat a selection | Excel Discussion (Misc queries) | |||
Don't want to repeat a selection | Excel Discussion (Misc queries) | |||
ListBox selection | Excel Programming |