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

I need a macro that will, with the selected graph, do some operations to the
axis font (both primary and secondary), as well as a few other things, before
selecting the next graph in the page.

Any code help that can get me started on these tasks (I'm hoping once I see
the format of how to do the format manipulations, I can figure out the other
things I need to do, which are also formatting related).

Thx.
--
Boris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default chart formatting

Try turning on the macro recorder (under the tools=Macro=Record a new
macro) and then perform the actions manually. Then turn off the macro
recorder and see what you have.

--
Regards,
Tom Ogilvy


"BorisS" wrote:

I need a macro that will, with the selected graph, do some operations to the
axis font (both primary and secondary), as well as a few other things, before
selecting the next graph in the page.

Any code help that can get me started on these tasks (I'm hoping once I see
the format of how to do the format manipulations, I can figure out the other
things I need to do, which are also formatting related).

Thx.
--
Boris

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default chart formatting

thanks, but that doesn't do it. It won't record the actions within the
graphs, for some reason. Do you know the code otherwise? Otherwise, I'll
repost, as I tend to find no one looks at things that have responses, even if
the question remains unanswered.
--
Boris


"Tom Ogilvy" wrote:

Try turning on the macro recorder (under the tools=Macro=Record a new
macro) and then perform the actions manually. Then turn off the macro
recorder and see what you have.

--
Regards,
Tom Ogilvy


"BorisS" wrote:

I need a macro that will, with the selected graph, do some operations to the
axis font (both primary and secondary), as well as a few other things, before
selecting the next graph in the page.

Any code help that can get me started on these tasks (I'm hoping once I see
the format of how to do the format manipulations, I can figure out the other
things I need to do, which are also formatting related).

Thx.
--
Boris

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default chart formatting

It recorded fine for me:

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 06/18/2007 by OGILVTW
'

'
ActiveChart.Axes(xlValue, xlPrimary).Select
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "AvantGarde"
.FontStyle = "Regular"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.Axes(xlValue, xlSecondary).Select
Selection.TickLabels.NumberFormat = "#,##0,"
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Book Antiqua"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
End Sub

--
Regards,
Tom Ogilvy


"BorisS" wrote:

thanks, but that doesn't do it. It won't record the actions within the
graphs, for some reason. Do you know the code otherwise? Otherwise, I'll
repost, as I tend to find no one looks at things that have responses, even if
the question remains unanswered.
--
Boris


"Tom Ogilvy" wrote:

Try turning on the macro recorder (under the tools=Macro=Record a new
macro) and then perform the actions manually. Then turn off the macro
recorder and see what you have.

--
Regards,
Tom Ogilvy


"BorisS" wrote:

I need a macro that will, with the selected graph, do some operations to the
axis font (both primary and secondary), as well as a few other things, before
selecting the next graph in the page.

Any code help that can get me started on these tasks (I'm hoping once I see
the format of how to do the format manipulations, I can figure out the other
things I need to do, which are also formatting related).

Thx.
--
Boris

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default chart formatting

Excel 2007's macro recorder has been crippled when formatting charts and
shapes. I guess they ran out of time to encode these new elements. If you
still have Excel 2003 or earlier installed somewhere, use the macro recorder
in this version, and use that code as an example.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"BorisS" wrote in message
...
thanks, but that doesn't do it. It won't record the actions within the
graphs, for some reason. Do you know the code otherwise? Otherwise, I'll
repost, as I tend to find no one looks at things that have responses, even
if
the question remains unanswered.
--
Boris


"Tom Ogilvy" wrote:

Try turning on the macro recorder (under the tools=Macro=Record a new
macro) and then perform the actions manually. Then turn off the macro
recorder and see what you have.

--
Regards,
Tom Ogilvy


"BorisS" wrote:

I need a macro that will, with the selected graph, do some operations
to the
axis font (both primary and secondary), as well as a few other things,
before
selecting the next graph in the page.

Any code help that can get me started on these tasks (I'm hoping once I
see
the format of how to do the format manipulations, I can figure out the
other
things I need to do, which are also formatting related).

Thx.
--
Boris





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
copy chart formatting and chart templates in Excel 2007 Astelix Charts and Charting in Excel 4 March 4th 10 04:10 AM
Chart formatting Dave F[_3_] Excel Discussion (Misc queries) 0 March 6th 08 06:42 PM
Pivot Chart Refresh cancels all chart formatting Nico[_2_] Charts and Charting in Excel 2 September 9th 07 05:22 AM
chart formatting Zahilly Excel Discussion (Misc queries) 0 June 19th 06 07:34 PM
Pivot Table border formatting and pivot chart formatting [email protected] Excel Discussion (Misc queries) 0 July 22nd 05 02:22 PM


All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"