ComputerForum.com ComputerForum.com  

Go Back   Computer Forum > Computer Software > General Software

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-01-2009, 04:47 PM   #1 (permalink)
New Member
 
Join Date: Oct 2009
Posts: 7
Default click to enlarge an Excel chart

Hello
I'm using Excel 2007
What I need to do is have a tab with just charts on it that gets data from another tab. There will be 20 charts on the chart tab. Instead of having buttons to enlarge or decrease size I would like to just be able to double click a single chart to increase the size by 50% then double clicking again would reduce the size to the original size.

I tried this code for increasing and will worry about decreasing it later.
Code:
Private Sub Chart1_Click()
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.ChartArea.Select
    ActiveChart.ChartArea.Height = ActiveChart.ChartArea.Height + 10
    ActiveChart.ChartArea.Width = ActiveChart.ChartArea.Width + 10
End Sub
and this code...
Code:
Private Sub Chart1_Click()
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.ChartObjects.Select
    ActiveChart.ChartObjects.Height = ActiveChart.ChartObjects.Height + 10
    ActiveChart.ChartObjects.Width = ActiveChart.ChartObjects.Width + 10
End Sub
...it gives the error "Run-time error 5 Invalid procedure call or argument"
thanks for any help
Steve
stevezmyname is offline   Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
Help Please!! tbest08 Desktop Computers 7 07-20-2008 03:20 PM
Help Starving Children jimkonow Off Topic Chat 11 07-03-2008 02:48 PM


All times are GMT +1. The time now is 05:27 PM.


Powered by: vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.