Pregunta: | 26140 - MANIPULAR EL OBJETO MICROSOFT GRAPH 2000 |
Autor: | Francisco Ayala |
Tengo una plantilla de Word, con gráficos insertados de Microsoft Graph 2000,
Necesito pasar los valores a la tabla de datos de los Graficos desde Visual Basic 6.00, y que se actualice el mismo cada vez que los mande si alguien me puede ayudar se lo agradeceré. |
Respuesta: | MILTON GUERRERO RIOS |
ESTE CODIGO TE PUEDE AYUDAR PARA Q LO PRUEBES REFERENCIA EN VISUAL EL OFFICE Y MICROSFT GRAPH
Private Sub Command1_Click() Dim MSGraph As Object, f As Long, c As Long Set MSGraph = CreateObject("MSGraph.Application") MSGraph.Visible = True With MSGraph.DataSheet .Cells.Clear .Cells(2, 1).Value = "Tornillos" .Cells(3, 1).Value = "Tuercas" .Cells(4, 1).Value = "Clavos" .Cells(1, 2).Value = "Año 2002" .Cells(1, 3).Value = "Año 2003" For f = 2 To 4 For c = 2 To 3 .Cells(f, c).Value = Rnd * 10000 Next c Next f End With MSGraph.Update 'MSGraph.Visible = True MsgBox "Pulse Aceptar para cerrar Microsoft Graph" MSGraph.Quit Set MSGraph = Nothing End Sub |