+ Reply to Thread
Results 1 to 4 of 4

Redim Preserve Change LBOUND

  1. #1
    Registered User
    Join Date
    03-14-2012
    Location
    wwr
    MS-Off Ver
    Excel 2010
    Posts
    16

    Redim Preserve Change LBOUND

    Hello

    I have a single dimensional array in which I want to change lower bound, keeping the upper bound as same.

    One way is to loop through the array and copy the desired values to a new variable. But, is there any shortcut or direct function ?

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

    Re: Redim Preserve Change LBOUND

    Not really. Chip Pearson has a whole page of array functions including ChangeBoundsOfArray at http://www.cpearson.com/excel/vbaarrays.htm

  3. #3
    Forum Contributor kalbasiatka's Avatar
    Join Date
    02-27-2016
    Location
    Brest, Belarus
    MS-Off Ver
    2021
    Posts
    224

    Re: Redim Preserve Change LBOUND

    Quote Originally Posted by cytop View Post
    And you do read what is written there? Same shifting from one array to another.
    To do it for me and help me it is 2 different things!
    Sorry for my english, blame Google translator

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

    Re: Redim Preserve Change LBOUND

    Yes, I did read it, a long time ago.

    I would have assumed the original poster would come to the conclusion that changing the lower bound of an array is not really a practical thing to do. A possible way to work it was mentioned in the post
    One way is to loop through the array and copy the desired values to a new variable
    - so ending up with a new array does not seem to be out of the question.

    The link was offered so that perhaps he (or she) might be able to find some way to accomplish what they want - but to be honest, I can't think of a reason to change the lower bound of any array.

    I do hope I have explained myself to your satisfaction.

+ 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. Arrays - Redim Preserve
    By BuZZarD73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 04:17 AM
  2. [SOLVED] ReDim Preserve problem
    By randomdude in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-25-2014, 05:40 AM
  3. redim preserve error
    By ggabi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2012, 03:00 AM
  4. redim preserve multidimensional array
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2011, 02:48 PM
  5. Redim Preserve Issues in Loop
    By l8sk8r in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2009, 02:43 PM
  6. Redim Preserve 2D Array
    By kraljb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2006, 03:23 PM
  7. [SOLVED] redim preserve
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2005, 09:45 AM

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