View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier[_2_] Jon Peltier[_2_] is offline
external usenet poster
 
Posts: 461
Default Excel 2007 does not record macro when manipulating objects

Actually, Peter's suggestion IS functionally helpful. Granted, the
object model is pretty obscure, especially some of the new object
branches introduced in 2007. It requires some effort to try all of the
different members of each object, including some that are not given
descriptive names. After a while, you will begin to remember the
hierarchy, and the process will become less tedious.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



mgilberg wrote:
Peter...

Your suggestion is technically correct, but functionally not helpful. If
you don't already know what property/method name that you seek, there is no
way to find it. For example, I wanted to change labels in a chart to read
vertically instead of the default horizontal. There was NO WAY to track down
the correct combination of properties to set the desired value in XL2007. So
I went back to 2003 and recorded a macro, found the property was
Tickmark.Orientation = xlDownward. Piece of cake. But if you don't know to
look for Tickmark, you'll never find it. Unless you have a suggestion!
Which is why I'm writing. Do you have a suggestion for tracking through
choices that otherwise don't appear. When I looked at the object browser I
still could not find Tickmark until I searched for the term that I got from
XL 2003. Any advice? Thanks!

..........mitch

"Peter T" wrote:

Unfortunately Excel 2007's macro recorder does not record many actions to
objects such as Shapes and Charts, as you've noticed. If you have Excel 2003
available you are lucky!

However there are quite a lot of new format properties for objects in 2007
which are unknown in earlier versions. Best way to find these is in Excel
2007 fully to declare your object variables, eg
Dim shp as Shape
Dim cht as Chart
Dim sr as Series

Type shp. and look at the intellisense after typing the dot. When you see
something that looks promising complete it, select it and F1 to see more
about it in help.

Also look in Object Browser, F2

Regards,
Peter T


"Mehdi" wrote in message
...
Excel 2007 does not save anything in macro when manipulating objects, but
excel 2003 does. Is there anything wrong with Excel 2007? How to overcome
this hassle?