Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Line Gradient in Excel 2007

One general method of figuring out how something is done in VBA is to do
it in excel while recording a macro and then studying the macro.


That is true generally but FYI in Excel 2007 few, if any, actions taken on
shapes are recorded by the macro recorder. For example this is the code
recorded when I changed the fill color of a selected rectangle from blue to
red in Excel 2007:

Sub Macro1()
'
' Macro1 Macro
'
End Sub

MS made extensive changes to shapes in Excel 2007 and recording with regard
to them was broken. They told beta testers that they'd like to restore it
in a later version.

--
Jim
"Alok" wrote in message
...
| Shahin,
| As far as I know you cannot apply a gradient to a line. It has to be a
solid
| color.
| One general method of figuring out how something is done in VBA is to do
it
| in excel while recording a macro and then studying the macro.
| Happy new year.
| Alok
|
| "Shahin.H" wrote:
|
| Happy new year everybody,
| I would like to write a macro in EXCEL 2007 (in year 2007 ;) ) to change
| line fill gradient. Suppose, I have a shape which has a fill gradien
color
| and its border has a gradient line color (NOT solid color). So, I wonder
I
| can change gradient line color by writing such a macro? I know this is
| possible to change gradient fill color of shapes in Excel 2007, but I
haven't
| find anything for gradient line color in VBA programming.
|
| I would be very grateful if anybody could help me.
|
| Best regards,
| Shahin.H
|


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Line Gradient in Excel 2007

Thank you Jim and Alok. As Jim said, this is not possible in Beta version as
well as released version that also I have it.
Alok, in Excel 2007, there is a possibility to have a gradient for line. You
can just draw a line and in Format shapes, choose Line color and Gradient
line. However, if you write a macro to define a gradient line color you
cannot find these property while it exists in design mode. I wonder if there
exists in somewhere else that I have not find it yet or not?

Thank you and good luck!
Shahin


"Alok" wrote:

Thanks for the Info, Jim

Alok

"Jim Rech" wrote:

One general method of figuring out how something is done in VBA is to do
it in excel while recording a macro and then studying the macro.


That is true generally but FYI in Excel 2007 few, if any, actions taken on
shapes are recorded by the macro recorder. For example this is the code
recorded when I changed the fill color of a selected rectangle from blue to
red in Excel 2007:

Sub Macro1()
'
' Macro1 Macro
'
End Sub

MS made extensive changes to shapes in Excel 2007 and recording with regard
to them was broken. They told beta testers that they'd like to restore it
in a later version.

--
Jim
"Alok" wrote in message
...
| Shahin,
| As far as I know you cannot apply a gradient to a line. It has to be a
solid
| color.
| One general method of figuring out how something is done in VBA is to do
it
| in excel while recording a macro and then studying the macro.
| Happy new year.
| Alok
|
| "Shahin.H" wrote:
|
| Happy new year everybody,
| I would like to write a macro in EXCEL 2007 (in year 2007 ;) ) to change
| line fill gradient. Suppose, I have a shape which has a fill gradien
color
| and its border has a gradient line color (NOT solid color). So, I wonder
I
| can change gradient line color by writing such a macro? I know this is
| possible to change gradient fill color of shapes in Excel 2007, but I
haven't
| find anything for gradient line color in VBA programming.
|
| I would be very grateful if anybody could help me.
|
| Best regards,
| Shahin.H
|



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Line Gradient in Excel 2007

I just looked through the Object Browser and the online help for 2007. There
are a few new things listed, like LinearGradient and ColorStops, which are
new in 2007. However, none of these are associated with Line or LineFormat,
and Line and LineFormat have no new properties or methods. The VBA Language
Reference in MSDN does not yet include Office 2007. I haven't found any
explanation anywhere of how to program to the new shapes. The lack of macro
recorder functionality to provide insights into this new object model is
very unfortunate.

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


"Shahin.H" wrote in message
...
Thank you Jim and Alok. As Jim said, this is not possible in Beta version
as
well as released version that also I have it.
Alok, in Excel 2007, there is a possibility to have a gradient for line.
You
can just draw a line and in Format shapes, choose Line color and Gradient
line. However, if you write a macro to define a gradient line color you
cannot find these property while it exists in design mode. I wonder if
there
exists in somewhere else that I have not find it yet or not?

Thank you and good luck!
Shahin


"Alok" wrote:

Thanks for the Info, Jim

Alok

"Jim Rech" wrote:

One general method of figuring out how something is done in VBA is to
do
it in excel while recording a macro and then studying the macro.

That is true generally but FYI in Excel 2007 few, if any, actions taken
on
shapes are recorded by the macro recorder. For example this is the
code
recorded when I changed the fill color of a selected rectangle from
blue to
red in Excel 2007:

Sub Macro1()
'
' Macro1 Macro
'
End Sub

MS made extensive changes to shapes in Excel 2007 and recording with
regard
to them was broken. They told beta testers that they'd like to restore
it
in a later version.

--
Jim
"Alok" wrote in message
...
| Shahin,
| As far as I know you cannot apply a gradient to a line. It has to be
a
solid
| color.
| One general method of figuring out how something is done in VBA is to
do
it
| in excel while recording a macro and then studying the macro.
| Happy new year.
| Alok
|
| "Shahin.H" wrote:
|
| Happy new year everybody,
| I would like to write a macro in EXCEL 2007 (in year 2007 ;) ) to
change
| line fill gradient. Suppose, I have a shape which has a fill
gradien
color
| and its border has a gradient line color (NOT solid color). So, I
wonder
I
| can change gradient line color by writing such a macro? I know this
is
| possible to change gradient fill color of shapes in Excel 2007, but
I
haven't
| find anything for gradient line color in VBA programming.
|
| I would be very grateful if anybody could help me.
|
| Best regards,
| Shahin.H
|





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
Change gradient color in chart for Excel 2007 NonTechie Charts and Charting in Excel 6 May 9th 23 03:43 AM
How do I select two colors for Gradient Fill Excel 2007 Hennie[_2_] Charts and Charting in Excel 1 August 14th 09 09:15 AM
Charts - Gradient fill Plot Area in Excel 2007 Geoff Budd Charts and Charting in Excel 4 February 4th 09 05:44 PM
Were non-gradient chart patterns left out of Excel 2007? Arthur Tabachneck Charts and Charting in Excel 2 August 28th 07 01:58 AM
Are the non-gradient chart patterns missing from Excel 2007? Art[_3_] Excel Worksheet Functions 1 August 27th 07 10:37 PM


All times are GMT +1. The time now is 04:08 AM.

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"