+ Reply to Thread
Results 1 to 4 of 4

Runtime error 7 out of memory vba apple mac

Hybrid View

  1. #1
    Registered User
    Join Date
    08-26-2016
    Location
    Argentina
    MS-Off Ver
    2011
    Posts
    7

    Talking Runtime error 7 out of memory vba apple mac

    I have this macro:

    Sub Clean()
    
    'Consulta sobre si ejecutar la macro o no
    Dim Resp As Byte
    Resp = MsgBox("Deseas borrar todo el contenido de la tabla?", _
        vbQuestion + vbYesNo, "Automation")
    If Resp = vbYes Then
        'Borrar contenido
        NumRow = Application.WorksheetFunction.CountA(ActiveSheet.Range("D:D"))
        Range("D16:H1048576").Select
        Selection.ClearContents
        Range("D16").Select
        Sheets("Registro").Select
        Range("B2:C7").Select
        Selection.ClearContents
        Range("A1").Select
        Sheets("Principal").Select
        
    'Mensaje
        MsgBox "Se eliminaron " & NumRow - 5 & " queries"
    
        'Aqu’ se ejecutar’a el c—digo
    Else
        MsgBox "Elegiste no limpiar la tabla.", vbCritical, "Automation"
    End If
    
    
    
    'Sacar filtro
    If ActiveSheet.AutoFilterMode Then
        Range("D15").Select
        Selection.AutoFilter
        End If
        
        
        
    End Sub

    When i use this macro on my desktop computer it works really well, but not in the MacBook Air.


    Any ideas of what is going on with the code or why the mac run out of memory?

    Thanks a lot!

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Runtime error 7 out of memory vba apple mac

    Try


    Sub Clean()
    
        'Consulta sobre si ejecutar la macro o no
        Dim Resp As Variant
        
        Resp = MsgBox("Deseas borrar todo el contenido de la tabla?", _
            vbQuestion + vbYesNo, "Automation")
        
        If Resp = vbYes Then
            'Borrar contenido
            NumRow = Application.WorksheetFunction.CountA(ActiveSheet.Range("D:D"))
            Range("D16:H" & NumRow).ClearContents
            Sheets("Registro").Select
            Range("B2:C7").ClearContents
            Range("A1").Select
            Sheets("Principal").Select
            
        'Mensaje
            MsgBox "Se eliminaron " & NumRow - 5 & " queries"
        
            'Aqu’ se ejecutar’a el c—digo
        Else
            
            MsgBox "Elegiste no limpiar la tabla.", vbCritical, "Automation"
        
        End If
    
        'Sacar filtro
        If ActiveSheet.AutoFilterMode Then
        
            Range("D15").AutoFilter
            
        End If
        
    End Sub

  3. #3
    Registered User
    Join Date
    08-26-2016
    Location
    Argentina
    MS-Off Ver
    2011
    Posts
    7

    Re: Runtime error 7 out of memory vba apple mac

    Thanks a lot Poizhan! But i made a wrong consult, could you help me in this code http://www.excelforum.com/showthread...2#post4468022? Thanks!

  4. #4
    Registered User
    Join Date
    08-26-2016
    Location
    Argentina
    MS-Off Ver
    2011
    Posts
    7

    Re: Runtime error 7 out of memory vba apple mac

    I have the same problem with this code:


    Sub Filtro()
    
    NumRow = Application.WorksheetFunction.CountA(ActiveSheet.Range("D:D"))
    VolumeSum = Application.WorksheetFunction.Sum(ActiveSheet.Range("E:E"))
    Dim Cuadro As Range
    Set Cuadro = ThisWorkbook.ActiveSheet.Range("D15").CurrentRegion
    
    Tiempo = Now
    
    J = 0
    
    'Proceso de borrado de filas
    For I = 2 To NumRow
        If IsEmpty(Cuadro(I, 1)) Then Exit For
        J = J + 1
            For Each Filtro1 In Sheets("Filtro").Range("A2:A60000")
            If IsEmpty(Filtro1) Then Exit For
            If InStr(1, Cuadro(I, 1), Filtro1, vbTextCompare) <> 0 Then
            I = I - 1
            Cuadro(I + 1, 1).EntireRow.Delete
            End If
        Next
        Application.StatusBar = "Queries procesadas: " & J & " de " & NumRow - 5 & "."
        DoEvents
    Next I
    
    
    
    Application.StatusBar = False
    
    'Mensaje
    MsgBox "Quedaron " & NumRow2 - 5 & " queries, se eliminaron " & Worksheets("Registro").Range("B3").Value & ". Filtro hecho en " & Format(Now - Tiempo, "hh:mm:ss")
    
    End Sub
    Thanks!

+ 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. Replies: 4
    Last Post: 02-10-2014, 03:42 AM
  2. [SOLVED] How do I convert text ie apple to string "apple" in excel or VBA?
    By dav_mark in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2013, 06:05 PM
  3. Replies: 1
    Last Post: 12-08-2011, 08:52 AM
  4. runtime error “out of memory”+excel macro
    By bhavin12300 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2010, 02:25 AM
  5. [SOLVED] Runtime Error "7": Out of Memory
    By Run Time Error "7" in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2005, 08:10 AM
  6. How to handle error 8007000e Memory Error
    By L. A. M. in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2005, 11: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