+ Reply to Thread
Results 1 to 4 of 4

Getting index of variant

Hybrid View

Schwizer Getting index of variant 01-31-2014, 01:39 PM
shg Re: Getting index of variant 01-31-2014, 01:47 PM
Schwizer Re: Getting index of variant 01-31-2014, 03:33 PM
shg Re: Getting index of variant 01-31-2014, 03:36 PM
  1. #1
    Registered User
    Join Date
    01-29-2007
    Posts
    92

    Red face Getting index of variant

    I have the following code

    xrange = ActiveChart.SeriesCollection(1).XValues
    I then get the first value of the variant using

    startdate = xrange (1)
    But how do I get the last date?

    Schwizer

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Getting index of variant

    Maybe ...
        Dim xRange      As Variant
        Dim dateBeg     As Date
        Dim dateEnd     As Date
    
        xRange = ActiveChart.SeriesCollection(1).XValues
        dateBeg = xRange(1)
        dateEnd = xRange(UBound(xRange))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-29-2007
    Posts
    92

    Re: Getting index of variant

    Appears to work.

    Thank you.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Getting index of variant

    You're welcome.

+ 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. Variant vs Array
    By Kyle123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2012, 09:45 AM
  2. Optional Variant
    By Desert Piranha in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2006, 12:42 AM
  3. variant to long?
    By James Cornthwaite in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2006, 11:00 AM
  4. [SOLVED] Passing value of variant
    By Andrew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2006, 10:20 PM
  5. Variant
    By owl527 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2005, 05:05 PM

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