Results 1 to 6 of 6

How do i solve error '28': Out of stack space

Threaded View

  1. #1
    Registered User
    Join Date
    04-24-2014
    Location
    Glendale, Colorado
    MS-Off Ver
    Microsoft 365 Version 2501
    Posts
    57

    How do i solve error '28': Out of stack space

    I am using the macro below and getting this error:

    Run-time error '28':
    Out of stack space

    Is there a solution to this? The macro looks for blank columns from Col 'B' to 'BA' and if the cell is blank it copies the preceding row data into the empty cells beneath it.

    Here is the macro:

    Option Explicit
    Sub Macro1()
    
        Dim lngEndRow As Long
        Dim lngMyRow As Long
    
        Application.ScreenUpdating = False
    
        lngEndRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    
        For lngMyRow = 2 To lngEndRow 'Starts at Row 2. Change the 2 to suit.
            If Evaluate("COUNTA(B" & lngMyRow & ":BA" & lngMyRow & ")") = 0 Then 'Looks at Col's B to BA. Change to suit.
                Range("B" & lngMyRow & ":BA" & lngMyRow).Value = Range("B" & lngMyRow - 1 & ":BA" & lngMyRow - 1).Value
            End If
        Next lngMyRow
    
        Application.ScreenUpdating = True
    
        MsgBox "Process is now complete.", vbInformation
    
    End Sub
    Last edited by Melissa Camp; 12-17-2015 at 08:01 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Error 28 Stack Space
    By scrabtree23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2015, 09:58 AM
  2. VBA Out of Stack Space Error 28
    By alexcapewell in forum Excel General
    Replies: 9
    Last Post: 10-13-2015, 07:01 AM
  3. Out of stack space error
    By lazyengineer in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-10-2015, 02:24 PM
  4. Run Time Error 28: Out of Stack Space
    By Shanahan0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2013, 10:42 AM
  5. Run-time error '28' Out of stack space
    By pinkpantherksa in forum Excel General
    Replies: 1
    Last Post: 12-13-2012, 06:33 PM
  6. Out of stack space error
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-20-2008, 03:47 PM
  7. [SOLVED] 'Out of stack space' error on SaveAs
    By Tim in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2005, 01: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