+ Reply to Thread
Results 1 to 5 of 5

Very Quick Question: VBs ItemData & NewIndex

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Very Quick Question: VBs ItemData & NewIndex

    I have some VB code I'm trying to convert to VBA.

    What is the VBA equivalent of the line below?
    Please Login or Register  to view this content.
    Last edited by mc84excel; 01-07-2015 at 06:56 PM.
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Very Quick Question: VBs ItemData & NewIndex

    I think you need to give us some context.

    Is this VB6 code? VB.Net? VB5?...
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Very Quick Question: VBs ItemData & NewIndex

    Neither have an equivalent in VBA...

    In VB (Both Classic and NET) ItemData is a numeric value that can be attached to each item in a ListBox and NewIndex returns the ListIndex of the the last added item. (A Listbox can be sorted in VB, so the ListIndex of the item is not necessarily ListCount - 1).
    Last edited by cytop; 01-07-2015 at 07:26 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Very Quick Question: VBs ItemData & NewIndex

    Quote Originally Posted by Norie View Post
    I think you need to give us some context.

    Is this VB6 code? VB.Net? VB5?...
    Hi Norie

    VB6

  5. #5
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Very Quick Question: VBs ItemData & NewIndex

    Quote Originally Posted by cytop View Post
    Neither have an equivalent in VBA...

    In VB (Both Classic and NET) ItemData is a numeric value that can be attached to each item in a ListBox and NewIndex returns the ListIndex of the the last added item. (A Listbox can be sorted in VB, so the ListIndex of the item is not necessarily ListCount - 1).
    Thanks for the explanation cytop. +1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Quick Listbox Help, values not showing up when selected (easy)
    By thelegazy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2013, 04:06 PM
  2. [SOLVED] Quick question about automatic row deletion (should be very quick and easy!!)
    By poptart141 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-09-2013, 12:56 PM
  3. Quick Question QUick Answer
    By ccraig61 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-25-2006, 09:34 PM
  4. [SOLVED] Quick Question re For and Next
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2006, 01:15 PM
  5. Quick question - quick answer about assigning shortcut keys
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2005, 06:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1