?
Solved

Histogram - Some Data will be hidden by embedded chart  --- EXCEL

Posted on 2011-10-21
4
Medium Priority
?
979 Views
Last Modified: 2012-05-12
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!!
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

Open in new window

0
Comment
Question by:solarissf
  • 3
4 Comments
 
LVL 15

Expert Comment

by:CSLARSEN
ID: 37007776
Hi
Maybe this will work
Just after diplay alerts
Application.screenupdating=False
.....
your code
Application.screenupdating=True
Cheers
cslarsen

0
 

Author Comment

by:solarissf
ID: 37007817
nope, still doesnt work.   helpppp
0
 

Accepted Solution

by:
solarissf earned 0 total points
ID: 37008235
I ended up moving
ActiveSheet.Range("$L$1")

the area where it puts the calculated data and it works.  no clue why
0
 

Author Closing Comment

by:solarissf
ID: 37035289
self solved
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question