Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Error when running macro in Excel

Hi all!

I am using a macro to attach lables to a XY curve in
Excel. To graph the curve I use a table linked to a pivot
table. That is, everytime I change something in the pivot,
the table (chart source) changes and, consequently, the
chart changes.

As a pivot table is a dynamic table, the number of lines
of the pivot table report may vary and the linked table
(chart source) shows zero values for that lines that do
not have any value (of course). To update the curve,
showing only the values I want, I use an Advanced Filter
to filter the same things I have chosen in the pivot table
menu.

The problem is: Everytime I run the macro to attach the
values to the XY chart after all that, I receive the
following error message:

Run-time error '1004':
Unable to get the Points property of the Series Class

Then I click End and everything is ok.... the labels are
there, the curve is ok, etc.

I would like to know if there is a way not to show this
message...

Thank you all in advance!

Raphael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error when running macro in Excel

It sounds to me like the code is doing what you want it to do eve
though you are getting an error. I would suggest hitting Debug (rathe
than end) and finding which line is giving the error. Then comment i
and everything below it out (since it is not running).



--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Error when running macro in Excel

Hi,

Thank you for the quick answer! The code works nice when
it is a permanent table (always the same number of columns
and lines). The problem is when there are zero values in
the labels column. For instance: airport A has a volume of
123, airport B 145, etc... and at the last lines of the
list, airport 0 (zero) has a volume of 0(zero). The macro
is unable to find the names.

I would like just not this message to show.

I´ve tried to insert before the macro the
Application.DisableWarning = True line but it did not work.

Thanks!

Raphael



-----Original Message-----
It sounds to me like the code is doing what you want it

to do even
though you are getting an error. I would suggest hitting

Debug (rather
than end) and finding which line is giving the error.

Then comment it
and everything below it out (since it is not running).

K


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error when running macro in Excel

Somewhere before you get the error, put this line in:

On Error Goto ErrHnd

Then at the end of your subroutine (before End Sub) put this:

Exit Sub

ErrHnd:

Err.Clear

End Sub

This will essentially ignore your error and not show a message. Not
that it ignores all errors, so if things stop working right, you wil
need to comment out the On Error Goto ErrHnd statement.



--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Error when running macro in Excel

JUST PERFECT!

Many many thanks!!!! Hope I am able to help you some day!

Regards,

Raphael

-----Original Message-----
Somewhere before you get the error, put this line in:

On Error Goto ErrHnd

Then at the end of your subroutine (before End Sub) put

this:

Exit Sub

ErrHnd:

Err.Clear

End Sub

This will essentially ignore your error and not show a

message. Note
that it ignores all errors, so if things stop working

right, you will
need to comment out the On Error Goto ErrHnd statement.

K


---
Message posted from http://www.ExcelForum.com/

.

Reply
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
Error 400 when running Macro Jim@Tech Excel Discussion (Misc queries) 3 October 20th 08 05:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Error Running a Macro viddom Excel Discussion (Misc queries) 3 July 28th 05 01:56 PM
KERNEL32.DLL error after running EXCEL Macro Dan[_16_] Excel Programming 0 July 23rd 03 08:15 PM


All times are GMT +1. The time now is 05:18 AM.

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

About Us

"It's about Microsoft Excel"