ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How can we generate excel graphics with VBA?

user-image
تم إضافة السؤال من قبل mohamed kajji
تاريخ النشر: 2013/05/21
Abdul Ghani
من قبل Abdul Ghani , Senior Design Engineer , Fatin Home Furniture LLC

http://ce270.groups.et.byu.net/syllabus/vbaprimer/graphics/ I hope this will help you

Mutassem Watfa
من قبل Mutassem Watfa , Finance Manager , Talas Group

Please Try this code....

 

Sub AddChartValues()On Error GoTo Err1Dim i, k As Integerk = InputBox("Enter the number of the Series")  Range("A1") = "Titles"  Range("B1") = "Values" For i =1 To k Range("A" & i +1) = InputBox("Enter the  title Number  " & i) Range("B" & i +1) = InputBox("Enter the Value " & i)    Next i   '''''''  ActiveSheet.Shapes.AddChart.Select    ActiveChart.ChartType = xl3DColumnStacked    ActiveChart.SetSourceData Source:=Range("A1:b" & i)     ActiveChart.SeriesCollection(1).ChartType = xlColumnClustered   ActiveChart.SeriesCollection(1).Trendlines.Add    ActiveChart.SeriesCollection(1).Trendlines(1).Select    With Selection        .Type = xlPolynomial        .Order =6    End With  ActiveChart.Legend.Select    ActiveChart.Legend.LegendEntries(2).Select    Selection.Delete     Exit SubErr1: End Sub

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟