I am trying to create a pie chart using VBA. I wrote the below mentioned code but it gives me error 91 while executing. Can anyone help me solve this issue
Code:
![]()
Please Login or Register to view this content.
I am trying to create a pie chart using VBA. I wrote the below mentioned code but it gives me error 91 while executing. Can anyone help me solve this issue
Code:
![]()
Please Login or Register to view this content.
Last edited by Cutter; 08-09-2012 at 06:15 PM. Reason: Added code tags
@ aakash_bh
Welcome to the forum.
Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
Thanks.
Problem has been solved. Error was in this line Set ocht = ActiveChart. It should be Set ocht = excel1.ActiveChart
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks