Adding And Apply Gradients To Shapes With Vba?

 graphic excel vba

Apply gradient forms in Excel is one of the many features that has this fabulous spreadsheet that seems to have no limits.

already surprised us with its great ability to perform math and other things that do not necessarily have to do with math.

Adding and Applying gradients forms with VBA

You may also be interested in:

That’s why starting this tutorial shows you where you can configure and then apply to aggregate to a sheet of Excel .

Add a figure in the Excel

If you reached this guide to learn how to apply gradients to shapes, means that knowledge has to add figures.

But it never hurts to mention how to do for those who have no experience with the Excel management and the tools you have.

You may work for an educational practice has been asked for this feature and therefore have to learn how to add shapes and apply the degrading effect .

So, the first thing you should do and which is obvious is to open a new spreadsheet by entering from the icon of the program.

In this way, it continues to select the option blank and a new template is created Excel. Then the action to the « Insert » is directed tab.

It will be a button with the name « Illustrations » in which they appear three alternatives to choose related to the segment.

 excel spreadsheet mosaic background

Among these, there will be one that is called « Figures «, which will hold a small arrow pointing in a downward direction.

Such « Flechilla «, to be selected the show a range of figures placed in different categories, such as geometric figures and others.

can be chosen, for example, the figure of the cube. This will make the drawing tool, to be used anywhere by clicking and holding down, stretches to give form size is enabled.

Another way to add shapes to your spreadsheet is using the method AddShape .

When determining what size it is to have, only to be solar and image will be inserted into the Excel spreadsheet.

Apply degraded forms inserted into the Excel

Now, to apply degraded forms embedded in the Excel sheet have to rely on a tool called « Visual Basic «.

This is a kind of console commands which are added, also known as « Macros » to build an extra feature. VBA allows you to create quickly and easily to use macros in Excel.

You can access it via the tab « Developer » or « Developer » in which there will be in the top left of the aforementioned tool.

When you tap it, it will open a popup window consists of a sidebar location and a blank screen on the rest of it.

To proceed, you can create a new folder and then a new location called « Modules » or « Macros » where is inserted that of the gradient effect.

Then, in the blank section will be the command line that will enable the desired function in question will write.

 drawing excel vba

The programming of this macro is based on three arguments, which will determine the parameters, which are: « Style «, « Variant » and « Fill «. Would be something like this:

Under GradiantShape

Dim obFill as FillFormat

September obFill = ActiveSheet.Shapes (1) .Fill

ObFill.ForceColor.RGB = RGB (255, 255, 255)

Wich obFill

.OneColorGradient msoGradientVertical, 2, 0.02

Wich .GradientStops (1)

.Color = RGB (234, 122, 17)

.Position = 0

.Transparency = 0

End Wich

It should be to note that this may vary, all depends on the style or the way the user wants to display the effect.

is the same with the color values ​​given in parentheses represent tone will Figure , which can be changed at will.

Note that this formula would be something standard, there are many combinations, but ideally you take a course to specialize in building one.

Another important fact is that not copy and paste the formula, you have to type every word step for the Excel guide and no errors.

As the VBA format lets you create macros to work with ways this program can also create macros for add graphics to your Excel spreadsheets both normal, like pie charts.

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

You may also be interested in:

Deja un comentario