ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Macro error, range object need data? (https://www.excelbanter.com/charts-charting-excel/146531-macro-error-range-object-need-data.html)

Daniel

Macro error, range object need data?
 
Hi all
How can I improve my macro which has a macro error like below:

"Macro error
The method can't be used in the applied context. Specifically, some Range
object methods require that the range contain data. If the range does not
contain data, the method fails."

How can I modify range object which has some empty data in the range?
Thanks
Daniel

Andy Pope

Macro error, range object need data?
 
Hi,

Does the range you are referencing contain data? Empty cells or those
containing #N/A can cause problems when using the charting section of
the object model.

Cheers
Andy

Daniel wrote:
Hi all
How can I improve my macro which has a macro error like below:

"Macro error
The method can't be used in the applied context. Specifically, some Range
object methods require that the range contain data. If the range does not
contain data, the method fails."

How can I modify range object which has some empty data in the range?
Thanks
Daniel



All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com