*** set the LOCALEID to English nlLocaleId=Sys(3004) && Save local id =Sys(3006,1033) && We will be sending instructions in English * Part of xlChartType constants #Define xlBubble3DEffect 87 #Define xlColumnClustered 51 #Define xlBarClustered 57 #Define xlCategory 1 #Define xlValue 2 #Define xlSeriesAxis 3 Select country,Cnt(*) As 'Count' ; from customer ; group By country ; into Cursor crsGraph Wait Window Nowait "Filling cell values..." MCGDATA = "" nCols = Fcount() For ix = 1 To nCols MCGDATA = MCGDATA + Iif(Empty(MCGDATA),"",Chr(9))+Field(ix) Endfor lcTemp = Sys(2015)+'.tmp' Copy To (m.lcTemp) Delimited With "" With Tab MCGDATA = MCGDATA + Chr(13)+Chr(10) + ; FileToStr(m.lcTemp) Erase (m.lcTemp) Create Cursor testgen (graphtest g) Append Blank Append General graphtest Class MSGraph.Chart Data MCGDATA oForm = Createobject("Form") With oForm .Height = 450 .Width = 650 .Show .Closable = .F. .AddObject("myQuit1","myQuit") .AddObject("myGraph","OleBoundControl") With .myGraph .Height = oForm.Height - 20 .Width = oForm.Width .Left = 0 .Top = 20 .ControlSource = "testgen.graphtest" Wait Window Nowait "Plotting..." .ChartType=xlColumnClustered .Object.Application.plotby = 2 && Columns .haslegend = .F. With .Axes(xlCategory).TickLabels With .Font .Name = "Arial" .FontStyle = "Normal" .Color = Rgb(255,0,0) .Size = 8 Endwith .Offset = 50 .Orientation = 90 Endwith With .Axes(xlValue).TickLabels With .Font .Name = "Arial" .FontStyle = "Normal" .Color = Rgb(0,0,255) .Size = 8 Endwith .Offset = 50 .Orientation = 45 Endwith .Visible=.T. Endwith .myQuit1.Visible = .T. Endwith Wait Clear **** Set the LocaleId to the previous value =Sys(3006,Val(nlLocaleId)) Read Events Define Class myquit As CommandButton Left=1 Top=0 AutoSize = .T. Caption="Close" Procedure Click Release All Clear Events Endproc EnddefineCetin