Turn on the macro recorder (Tools | Macro > Record new macro...), make the
change through the UI, turn off the recorder, and switch to the VBE. XL
will have generated the necessary code that you can customize/generalize as
required.

Signature
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
> Hi
>
> Has anyone ever worked out a way of changing trend lines (from say
> linear to moving average) using a macro?