Hacer grafica en excel desde V.B.
Publicado por Lukas (1 intervención) el 16/08/2001 12:05:04
Me gustaria saber como puedo desde Visual Basic crear un grafico, he sacado el codigo con una macro pero no funciona.
Este es el codigo:
Mixl.Charts.Add
Set ch = Mixl.Charts.Add
*Activechar.chartType = hoja.xlColumnClustered 'AQUI FALLA
Activechar.SetSourceData Source:=hoja.Sheets("Nombre").Range("A1:B10"), PlotBy _
:=hoja.xlRows
Mixl.Charts.Location Where:=hoja.xlLocationAsObject, Name:="Nombre"
With Activechar
.HasTitle = False
.Axes(hoja.xlCategory, hoja.xlPrimary).HasTitle = False
.Axes(hoja.xlValue, hoja.xlPrimary).HasTitle = False
End With
Espero vuestras respuestas, Gracias
Este es el codigo:
Mixl.Charts.Add
Set ch = Mixl.Charts.Add
*Activechar.chartType = hoja.xlColumnClustered 'AQUI FALLA
Activechar.SetSourceData Source:=hoja.Sheets("Nombre").Range("A1:B10"), PlotBy _
:=hoja.xlRows
Mixl.Charts.Location Where:=hoja.xlLocationAsObject, Name:="Nombre"
With Activechar
.HasTitle = False
.Axes(hoja.xlCategory, hoja.xlPrimary).HasTitle = False
.Axes(hoja.xlValue, hoja.xlPrimary).HasTitle = False
End With
Espero vuestras respuestas, Gracias
Valora esta pregunta


0