VBA- "Out of Memory" message

ilcaa

Well-known Member
Joined
May 25, 2005
Messages
686
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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

ilcaa

Well-known Member
Joined
May 25, 2005
Messages
686
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
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,305
Office Version
  1. 365
Platform
  1. Windows
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.
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Sorry, I can't see anything in there that would cause "Out of memory". Perhaps a close and restart of Excel is called for.
 

Forum statistics

Threads
1,144,158
Messages
5,722,827
Members
422,460
Latest member
VBA_Noob01

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
Top