![]() |
Resources problem with VBA & charts
I've written a short UDF with this line:
gUnit = ThisWorkbook.Worksheets(sReportSheet).ChartObjects (sChartName).Chart.Axes(xlValue).MajorUnit When I call the function from a small (27 kb) workbook I get this message: "Excel cannot complete this task with available resources. Choose less data or close other applications." But when I replace that line with... gUnit = .05 ....I don't get the message. And with regard to resources, these problems come after a reboot with only Excel open. Additionally, when that line is included, I'm getting very frequent crashes. Does anyone have any ideas about ways to get around these problems? Thanks. Charley |
Resources problem with VBA & charts
Charley -
This kind of thing is frustrating. Any other charts on the worksheet or in the workbook? Can't be many if it's only 27 kb. Can't be much other code, either. Is the UDF in a regular module? The one thing I'm thinking of is that it might be a corrupted worksheet or workbook (I had one the other day). See if rebuilding the sheet from a new blank sheet helps. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Charley Kyd wrote: I've written a short UDF with this line: gUnit = ThisWorkbook.Worksheets(sReportSheet).ChartObjects (sChartName).Chart.Axes(xlValue).MajorUnit When I call the function from a small (27 kb) workbook I get this message: "Excel cannot complete this task with available resources. Choose less data or close other applications." But when I replace that line with... gUnit = .05 ...I don't get the message. And with regard to resources, these problems come after a reboot with only Excel open. Additionally, when that line is included, I'm getting very frequent crashes. Does anyone have any ideas about ways to get around these problems? Thanks. Charley |
Resources problem with VBA & charts
How many cells are referencing the UDF?
Tim. "Charley Kyd" <kyd at incsight dot com wrote in message ... I've written a short UDF with this line: gUnit = ThisWorkbook.Worksheets(sReportSheet).ChartObjects (sChartName).Chart.Axes(xl Value).MajorUnit When I call the function from a small (27 kb) workbook I get this message: "Excel cannot complete this task with available resources. Choose less data or close other applications." But when I replace that line with... gUnit = .05 ...I don't get the message. And with regard to resources, these problems come after a reboot with only Excel open. Additionally, when that line is included, I'm getting very frequent crashes. Does anyone have any ideas about ways to get around these problems? Thanks. Charley |
All times are GMT +1. The time now is 05:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com