Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have a UserForm with a listbox, the RowSource is a column range Everything works fine except when the selected items are inserted int the spreadsheet, they are entered in reverse order from the colum range (they appear in the correct order in the listbox). Need som help. Example: Listbox selections Get inserted Item1 Item7 Item3 Item3 Item7 Item1 Here is the code which inserts the Listbox selections into th worksheet. Private Sub cmdEnterSelection_Click() Dim i As Long Dim j As Long j = 0 For i = 0 To Me.ListBox1.ListCount - 1 If Me.ListBox1.Selected(i) Then ActiveCell.EntireRow.Insert ActiveCell.Value = Me.ListBox1.List(i) j = j + 1 End If Next i ActiveCell.Offset(j, 0).Select OptionButton2.Value = True End Sub NOTE: The two optionbuttons are used to "Select All" and "Deselect All I don't think they are the problem -- Case ----------------------------------------------------------------------- Casey's Profile: http://www.excelforum.com/member.php...nfo&userid=454 View this thread: http://www.excelforum.com/showthread.php?threadid=53641 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to paste the date or the row in the reverse order | Excel Discussion (Misc queries) | |||
EXCEL - PASTE SPECIAL COULD HAVE AN OPERATION TO REVERSE ORDER | Excel Worksheet Functions | |||
paste in Reverse Order | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions | |||
how to paste the values in reverse order in workbook | Excel Discussion (Misc queries) |