S
sid_a
Version: MS Excel 2008
Operating System: Mac OS X 10.4.11
I want to change the properties like height and width etc of all charts in a
sheet as that of the active chart.
I am getting the properties of active chart properly but unable to set the
properties of other charts that are not active.
It seems as if the properties can't be changed of the charts that are not
active.
The code is below:
(Before running this code you must select one chart otherwise it will give
missing value for active chart.)
tell application "Microsoft Excel"
tell active chart
set chart_area to properties of chart area object
set height_active_chart to height of chart_area
set width_active_chart to width of chart_area
set top_active_chart to top of chart_area
set left_active_chart to left position of chart_area
end tell
repeat with chart_object in (get every chart object of active sheet)
display dialog name of chart_object as text
set height of properties of chart area object of chart_object to
height_active_chart
set width of properties of chart area object of chart_object to
width_active_chart
end repeat
end tell
Any help would be appreciated.
Thanks!
Operating System: Mac OS X 10.4.11
I want to change the properties like height and width etc of all charts in a
sheet as that of the active chart.
I am getting the properties of active chart properly but unable to set the
properties of other charts that are not active.
It seems as if the properties can't be changed of the charts that are not
active.
The code is below:
(Before running this code you must select one chart otherwise it will give
missing value for active chart.)
tell application "Microsoft Excel"
tell active chart
set chart_area to properties of chart area object
set height_active_chart to height of chart_area
set width_active_chart to width of chart_area
set top_active_chart to top of chart_area
set left_active_chart to left position of chart_area
end tell
repeat with chart_object in (get every chart object of active sheet)
display dialog name of chart_object as text
set height of properties of chart area object of chart_object to
height_active_chart
set width of properties of chart area object of chart_object to
width_active_chart
end repeat
end tell
Any help would be appreciated.
Thanks!