+ Reply to Thread
Results 1 to 2 of 2

empty/clear an array

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    56

    empty/clear an array

    Hello All,

    In VBA, I have an array that I can't seem to figure out how to clear. Below is the code...Thanks in advance for any help!

    Dim arrayCodes(1 To 19) As String
    Dim arrayLoad As Integer
    arrayLoad = 1
    
    For i = 3 To 19 'Loop for (columns)
                If Not IsEmpty(Cells(x, i).Value) Then
                    arrayCodes(arrayLoad) = Cells(x, i)
                End If
                arrayLoad = arrayLoad + 1
    Next i
    
    '?? how do I clear the arrayCodes

  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: empty/clear an array

    Erase ArrayCodes
    Entia non sunt multiplicanda sine necessitate

+ 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. Can't clear non-blank empty cells
    By jomili in forum Excel General
    Replies: 18
    Last Post: 02-09-2016, 02:51 PM
  2. Clear empty cells not working since they are not empty
    By Skogsborg in forum Excel General
    Replies: 2
    Last Post: 04-25-2013, 04:25 AM
  3. Clear cells if another cell is empty
    By dk-iceman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2010, 02:56 AM
  4. Clear Empty Cells
    By leighmills33 in forum Excel General
    Replies: 4
    Last Post: 10-16-2009, 11:25 AM
  5. How to empty/clear a collection
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2009, 03:42 PM

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