LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Error: Out of memory

I am using this small piece of code to format my chart so as to asjust the
min-max scale.

Sub FormatCharts()

On Error GoTo Err_Handler

shtPD.Activate

If (IsNumeric(shtCPD.Range("R6")) And IsNumeric(shtCPD.Range("R7")) And
_
IsNumeric(shtCPD.Range("T6")) And IsNumeric(shtCPD.Range("T7")))
Then

shtPD.ChartObjects("Chart 5").Activate
With ActiveChart.Axes(xlCategory)
.MinimumScale = shtCPD.Range("R6") ' gives error at this
line
.MaximumScale = shtCPD.Range("R7")
End With
With ActiveChart.Axes(xlValue)
.MinimumScale = shtCPD.Range("T6")
.MaximumScale = shtCPD.Range("T7")
End With

End If

' .......... and so on


The chart is placed in one of the sheets. I call the above sub on the
Worksheet_Change event when a particular condition is met. Sometimes, I get
the error "Out of memory" when I make some change in the sheet and the code
fails at the first line where I try to change the scale (the line)
.MinimumScale = shtCPD.Range("R6") ' gives error at this
line
I find nothing wrong on examining the value in R6.


I found the following ost from Tom, which talked about this error and charts
in general.

http://groups.google.com/group/micro...ing/browse_frm
/thread/eae7ca99666fc017/18808b12092efc93?q=%22out+of+memory%22&rnum=1&hl=e n
#18808b12092efc93
-----------------------13. Tom Ogilvy Aug 25, 11:52 pm show options

Do you have the zoom set to 100% on all sheets? Not being at 100% was a
source for out of memory errors in xl97. Also, charts used to be
troublesome and it had something to do with font scaling - but I would think
the later SP would be more resiliant than the early one, but one never
knows.
--
Regards,
Tom Ogilvy
------------------------

Does anyone have any idea about why I should be getting such an error.


--
- Mangesh
------------------------------------------
Office 2003 & Windows XP


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to handle error 8007000e Memory Error L. A. M. Excel Programming 6 June 28th 05 04:05 AM
Out of Memory Error Edgar Thoemmes Excel Programming 1 January 25th 04 01:52 PM
Out of memory error JJ[_6_] Excel Programming 1 January 23rd 04 03:29 PM
Out of Memory error Keith[_7_] Excel Programming 0 January 16th 04 01:58 PM
Out of memory error. LHW[_2_] Excel Programming 0 August 27th 03 06:51 AM


All times are GMT +1. The time now is 03:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"