Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Equlivelent to .NewIndex Property in VBA Excel ?

I am trying to make a listbox which is populated from a named range in
Excel that can then be reordered by clicking and dragging rows in the
listbox. I have found VB code that can do it, but when I tred to
recreate it in VBA I found that one of the properties, .NewIndex, does
not seem to exist in VBA. Here is the code with the nonexistant
property in it:


Private Sub ListBox1_Click()

End Sub

Private Sub ListBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
With ListBox1
DragIndex = .ListIndex
End With
End Sub

Private Sub ListBox1_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
With ListBox1
If DragIndex < .ListIndex Then
ListTest = .List(DragIndex)
.RemoveItem DragIndex
.AddItem ListText, .ListIndex + Abs(Shift = vbShiftMask)
.ListIndex = .NewIndex '<----**THIS IS THE PROBLEM**---<
End If
End With
End Sub

Private Sub UserForm_Click()

End Sub

Can anyone show this complete newbe a way around this missing
property?

Paul
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need an excel template for property management hayhow1 Excel Discussion (Misc queries) 0 February 1st 07 01:42 PM
I need a Excel template for property management Bob Excel Discussion (Misc queries) 1 December 29th 04 02:06 PM
Is there a Filename property in PrintOut property Christian[_6_] Excel Programming 4 September 3rd 04 10:12 PM
New UsedObjects Property in Excel XP Ian Ripsher[_3_] Excel Programming 1 February 28th 04 11:47 AM
HELP - simple VBA property causes Excel to crash No Name Excel Programming 0 October 23rd 03 08:38 PM


All times are GMT +1. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"