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!
Bookmarks