VBA- "Out of Memory" message

ilcaa

Well-known Member
Joined
May 25, 2005
Messages
751
Office Version
  1. 365
Platform
  1. Windows
I am creating a template, and have some formatting and 4 very basic macros. I try to rename, create a new macro and I keep getting a message that I dont have enough memory.

any one encounter this, how do i resolve?

thanks for any help.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
These are the formulas,

Sub insertnetformula()
'
' insertnetformula Macro
' Macro recorded 10/18/2006 by santos
'

'
Range("H2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-3]="""","""",IF(RC[-3]=""buy"",-RC[-2]*RC[1],RC[-2]*RC[1]))"
Range("H3").Select
End Sub

Sub insertformulaPrice()
'
' insertformulaPrice Macro
' Macro recorded 10/18/2006 by santos
'
Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]="""","""",staticquote(RC[-2],compFromShort(""Last""),""X""))"
Range("I3").Select
End Sub


Sub deleterowifcellblank()
' this code will delete all rows where
' a cell in COL 'E' is empty

Application.ScreenUpdating = True
[e:e].AutoFilter Field:=1, Criteria1:="="
[e2:e65536].SpecialCells(xlVisible).EntireRow.Delete
If [e1] = "" Then [1:1].Delete
ActiveSheet.AutoFilterMode = False
Application.ScreenUpdating = True
End Sub


Sub Fill_Net_and_Price()
Range("H2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-3]="""","""",IF(RC[-3]=""buy"",-RC[-2]*RC[1],RC[-2]*RC[1]))"
Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]="""","""",staticquote(RC[-2],compFromShort(""Last""),""X""))"
Range("h2:i2").Select
Range("h2:i2" & Range("g65536").End(xlUp).Row).Select
Selection.FillDown
End Sub
 
Upvote 0
Are staticquote and compFromShort user defined functions?

If they are I think that perhaps the error is caused by them rather than the posted code, which looks fine.
 
Upvote 0
Sorry, I can't see anything in there that would cause "Out of memory". Perhaps a close and restart of Excel is called for.
 
Upvote 0

Forum statistics

Threads
1,214,552
Messages
6,120,172
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top