+ Reply to Thread
Results 1 to 2 of 2

Error: Out of memory

  1. #1
    Mangesh Yadav
    Guest

    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=en
    #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



  2. #2
    Mangesh Yadav
    Guest

    Re: Error: Out of memory

    I find something is horribly wrong with Data > Validation. A problem similar
    to what I was having last week around. Only when I make change by selecting
    the item from the list, do I get the "out of memory" error. Manual entry
    with the keyboard works very fine.

    Mangesh




    "Mangesh Yadav" <[email protected]> wrote in message
    news:[email protected]...
    > 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=en
    > #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
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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