Ticklabes transparent in VBA??? help needed

zehran

New Member
Joined
Sep 29, 2015
Messages
1
Hey guys.

This is giving me a lot of problems, and have for sometime now. Searched the web for a solution but was not able to find one.
I recorded this macro, but vba will not play it.
I want to make the axis of one of my graphs transparent. (I have an another graph behind it)

The error that occurs is:

Run-time error '-2147467259 (80004005)':
Method 'TextFrame2' of object 'ChartFormat' failed

Here is the code(that I recorded):

ActiveSheet.ChartObjects("Diagram 3").Activate
ActiveChart.Axes(xlValue).Select
ActiveChart.Axes(xlValue, xlSecondary).Select
With Selection.Format.TextFrame2.TextRange.Font.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorBackground1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Solid
End With
ActiveChart.Axes(xlCategory).Select
With Selection.Format.TextFrame2.TextRange.Font.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorBackground1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Solid
End With
With Selection.Format.TextFrame2.TextRange.Font.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorBackground1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Solid
End With
End Sub

I really really hope you can help me, will appreciate it much :)
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
.Transparency = 1 will make the text/fill invisible (100% transparent), you may want to try .Transparency = .75 to see if that shows what you want
 
Upvote 0

Forum statistics

Threads
1,216,074
Messages
6,128,649
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top