Stephen Forero
asked on
Histogram - Some Data will be hidden by embedded chart --- EXCEL
Hi guys,
I have vba creating a histrogram below.
When I have c# launch the macro I get the following error message:
"Histogram - Some Data will be hidden by embedded chart"
I hit ok, then it creates just fine.
I'm looking to find either a way to fix the hidden data, (which I dont know why it would hide data)
or just stop the error message.
I already did application.displayalerts = false and that doesnt fix it.
Any ideas?
Thanks!!
I have vba creating a histrogram below.
When I have c# launch the macro I get the following error message:
"Histogram - Some Data will be hidden by embedded chart"
I hit ok, then it creates just fine.
I'm looking to find either a way to fix the hidden data, (which I dont know why it would hide data)
or just stop the error message.
I already did application.displayalerts = false and that doesnt fix it.
Any ideas?
Thanks!!
Sub Histogram()
AddIns("Analysis ToolPak").Installed = True
Sheets("Calc").Activate
Range("I1").Select
Application.Run "ATPVBAEN.XLAM!Histogram", Sheets("CData").Range("$B:$B"), _
ActiveSheet.Range("$L$1"), ActiveSheet.Range("$C$2:$C$12"), False, False, _
True, True
ActiveSheet.ChartObjects(1).Activate
With ActiveChart.Parent
.name = "Distribution"
.Height = Height ' resize
.Width = Width ' resize
.Left = 0 'resize
.Top = Top + 20 'resize
.Border.Color = vbBlack
End With
ActiveChart.ChartTitle.Text = "Returns Distribution"
ActiveChart.Parent.Cut
Sheets("Chart").Select
Range("A74").Select
ActiveSheet.Paste
With ActiveChart.Parent
.Height = Height ' resize
.Width = Width ' resize
.Left = 0 'resize
.Top = Top 'resize
'.Border.Color = vbBlue
End With
Dim ax As Axis
Set ax = ActiveChart.Axes(xlValue)
With ax
.HasMajorGridlines = True
End With
End Sub
ASKER
nope, still doesnt work. helpppp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
self solved
Maybe this will work
Just after diplay alerts
Application.screenupdating
.....
your code
Application.screenupdating
Cheers
cslarsen