|
Problem with getHTMLImageMap |
Posted by Alexx on Apr-29-2018 06:58 |
|
I use the following code to insert a Chart on a worksheet Excel:
Private Sub CommandButton_Click()
Dim Obj As OLEObject
Dim rng As Range
Dim x As Object
Set rng = Me.Range("D10")
Set Obj = Me.OLEObjects.Add(ClassType:="CDChartViewer.ChartViewer", Left:=rng.Left, Top:=rng.Top)
Set x = Me.OLEObjects(Obj.Name).Object
Call MyChart(x)
End Sub
Everything works, the Chart is created, but getHTMLImageMap method does not work correctly.
getHTMLImageMap method works only if I add the ChartViewer to the excel sheet manually, or go into the design mode....
I recorded the video, what happens if I add Chart programmatically:
https://www.youtube.com/watch?v=MSWs-FcKlsI&feature=youtu.be
!!! note that the Chart before going into design mode looks rather turbid.
Is it possible to solve this problem?
Thank you. |
Re: Problem with getHTMLImageMap |
Posted by Alexx on Apr-30-2018 03:45 |
|
In addition to my previous post.
I understood, that this was not a problem of the method getHTMLImageMap.
When Chart object is added programmatically, it is inactive, until I press the "Design Mode" button twice. Why is this happening?
I need to create an excel sheet and a graph dynamically, so the variants with the graph hiding are unsuitable.
How can I solve this problem? |
Re: Problem with getHTMLImageMap |
Posted by Alexx on May-02-2018 01:54 |
|
The solution is not the best, but it works.
Thank you. |
|