Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 07-18-2009, 01:45 PM
scorpio0077 scorpio0077 is offline
Registered User
 
Join Date: 01 Jun 2009
Location: Atlanta
MS Office Version:Excel 2007
Posts: 11
scorpio0077 is becoming part of the community
Change Chart Height

Please Register to Remove these Ads

How do I write a short piece of code that defines the specific height that I want to assign to a chart in Excel 2007?

I have multiple charts on a sheet and I want to update the vertical heights of the charts depending on the value inputted to a cell in the sheet.

Thanks

Last edited by scorpio0077; 07-19-2009 at 03:32 PM.
Reply With Quote
  #2  
Old 07-18-2009, 05:57 PM
romperstomper's Avatar
romperstomper romperstomper is offline
Valued Forum Contributor
 
Join Date: 04 Nov 2008
Location: The inner wardrobes of my mind
MS Office Version:95 onward (except 97)
Posts: 2,167
romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding romperstomper Has a higher level of understanding
Re: Change Chart Height

Do you mean the height of the chart area or of the chartobject? If it's the latter, then a loop like:
Code:
Dim objChtObj as ChartObject
For each objChtObj in Activesheet.chartobjects
   objChtObj.Height = Range("A1").Value
Next objChtObj
for example. Of course, you might want to move them too...
__________________
HTH,
R.

I am never wrong, but occasionally reality fails to live up to my expectations.
Reply With Quote
  #3  
Old 07-18-2009, 06:25 PM
scorpio0077 scorpio0077 is offline
Registered User
 
Join Date: 01 Jun 2009
Location: Atlanta
MS Office Version:Excel 2007
Posts: 11
scorpio0077 is becoming part of the community
Re: Change Chart Height

Hey romperstomper, Thanks for the reply. I did mean the Chart area and not the object.
Reply With Quote
  #4  
Old 07-18-2009, 11:56 PM
scorpio0077 scorpio0077 is offline
Registered User
 
Join Date: 01 Jun 2009
Location: Atlanta
MS Office Version:Excel 2007
Posts: 11
scorpio0077 is becoming part of the community
Re: Change Chart Height

What I am looking for is a way to change the Axis Option > Maximum Height across multiple charts, namely

Chart Tools > Format > Under Current Selection, choose Vertical (value) axis > Format Selection > Axis Option > Maximum Height.

I would like to enter the Maximum Height in a cell and the Maximum Value has to change accordingly.

Thanks!!
Reply With Quote
  #5  
Old 07-19-2009, 07:42 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Guru
 
Join Date: 10 May 2004
Location: Essex, UK
MS Office Version:2003 & 2007 sp2
Posts: 7,223
Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding
Re: Change Chart Height

See here
http://peltiertech.com/Excel/Charts/...nkToSheet.html
__________________
Cheers
Andy
www.andypope.info
Reply With Quote
  #6  
Old 07-19-2009, 03:32 PM
scorpio0077 scorpio0077 is offline
Registered User
 
Join Date: 01 Jun 2009
Location: Atlanta
MS Office Version:Excel 2007
Posts: 11
scorpio0077 is becoming part of the community
Re: Change Chart Height

Thanks Andy!!
Reply With Quote


Reply

Bookmarks

Tags
chart height


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump