Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Resizing charts

Hi All,

I have some 20 charts in a spreadsheet. I want all the charts to be of
same size (height and width). I am doing this with the following code:

Dim ChtOb As ChartObject
Dim ChartLeft As Double, ChartTop As Double
Sub ChartSize()
'
' ChartSize Macro
' Macro recorded 3/26/2007 by E366091
'
' Keyboard Shortcut: Ctrl+Shift+E
'

For Each ChtOb In ActiveSheet.ChartObjects
ChtOb.Height = 253.5
ChtOb.Width = 386.25
Next ChtOb
End Sub


Above code works perfectly when resizing the charts, but it again
create a duplicate of all the charts. I am not able to understands, as
why it creates a duplicate of the charts. Please help.

thanks,
navin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Resizing charts

Navin,
This code does not create duplicates for me.
Must be something else that is doing that.

NickHK

"navin" wrote in message
ups.com...
Hi All,

I have some 20 charts in a spreadsheet. I want all the charts to be of
same size (height and width). I am doing this with the following code:

Dim ChtOb As ChartObject
Dim ChartLeft As Double, ChartTop As Double
Sub ChartSize()
'
' ChartSize Macro
' Macro recorded 3/26/2007 by E366091
'
' Keyboard Shortcut: Ctrl+Shift+E
'

For Each ChtOb In ActiveSheet.ChartObjects
ChtOb.Height = 253.5
ChtOb.Width = 386.25
Next ChtOb
End Sub


Above code works perfectly when resizing the charts, but it again
create a duplicate of all the charts. I am not able to understands, as
why it creates a duplicate of the charts. Please help.

thanks,
navin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Resizing charts

Hi navin,

As Nick said your code does not create duplicate charts. Maybe you deleted
rows or columns containing charts making them zero height or width and
effectively invisible, then re-created similar charts. With this scenario
running your code would give the impression of creating duplicates.

Regards,
Peter T

"navin" wrote in message
ups.com...
Hi All,

I have some 20 charts in a spreadsheet. I want all the charts to be of
same size (height and width). I am doing this with the following code:

Dim ChtOb As ChartObject
Dim ChartLeft As Double, ChartTop As Double
Sub ChartSize()
'
' ChartSize Macro
' Macro recorded 3/26/2007 by E366091
'
' Keyboard Shortcut: Ctrl+Shift+E
'

For Each ChtOb In ActiveSheet.ChartObjects
ChtOb.Height = 253.5
ChtOb.Width = 386.25
Next ChtOb
End Sub


Above code works perfectly when resizing the charts, but it again
create a duplicate of all the charts. I am not able to understands, as
why it creates a duplicate of the charts. Please help.

thanks,
navin



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
Pasting Charts into Word then resizing them [email protected] Excel Discussion (Misc queries) 1 July 19th 07 09:35 PM
Resizing many charts Hosley Charts and Charting in Excel 5 November 21st 06 08:39 AM
Resizing Charts Andy Excel Discussion (Misc queries) 1 June 21st 06 08:05 PM
Resizing elements of Excel charts Artifactual Charts and Charting in Excel 2 March 31st 06 04:22 AM
Auto Resizing of Pie Charts RestlessAde Excel Discussion (Misc queries) 0 December 15th 04 08:53 PM


All times are GMT +1. The time now is 08:49 PM.

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"